]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/soil2/CMakeLists.txt
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / soil2 / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.9)
2
3 # Create the soil2 project
4 project("soil2" LANGUAGES C)
5
6 find_package(OpenGL)
7
8 # Do we want to install the headers?
9 option(INSTALL_HEADERS "Install header files" ON)
10
11 # Set the install dir
12 set(INSTALL_CMAKE_DIR share/soil2)
13
14 # Set the source files to compile
15 set(SOIL2_SRC
16 src/SOIL2/etc1_utils.c
17 src/SOIL2/image_DXT.c
18 src/SOIL2/image_helper.c
19 src/SOIL2/SOIL2.c
20 )
21
22 # Set the soil2 headers
23 set(SOIL2_HEADERS
24 src/SOIL2/SOIL2.h
25 src/SOIL2/etc1_utils.h
26 src/SOIL2/image_DXT.h
27 src/SOIL2/image_helper.h
28 src/SOIL2/jo_jpeg.h
29 src/SOIL2/pkm_helper.h
30 src/SOIL2/pvr_helper.h
31 src/SOIL2/stb_image.h
32 src/SOIL2/stb_image_write.h
33 src/SOIL2/stbi_DDS.h
34 src/SOIL2/stbi_ext.h
35 src/SOIL2/stbi_pkm.h
36 src/SOIL2/stbi_pvr.h
37 )
38
39 # Add the library as a static linkage
40 add_library(soil2 STATIC ${SOIL2_SRC})
41
42 # The include dir
43 target_include_directories(soil2 INTERFACE $<INSTALL_INTERFACE:include>)
44
45 # link opengl32
46 target_link_libraries(soil2 PRIVATE ${OPENGL_gl_LIBRARY})
47
48 # If its msvc mute the secure warnings
49 if(MSVC)
50 target_compile_definitions(soil2 PRIVATE _CRT_SECURE_NO_WARNINGS)
51 endif(MSVC)
52
53 if(INSTALL_HEADERS)
54 # Install the library object
55 install(TARGETS soil2 EXPORT soil2Targets
56 ARCHIVE DESTINATION lib
57 LIBRARY DESTINATION lib
58 )
59
60 # Install the headers
61 install(FILES ${SOIL2_HEADERS}
62 DESTINATION include/SOIL2/)
63
64 # Prepare for install package files
65 set(SOIL2_VERSION "release-1.11")
66
67 # Export the stuff
68 export(TARGETS soil2 FILE "${PROJECT_BINARY_DIR}/soil2Targets.cmake")
69 export(PACKAGE soil2)
70
71 # Create the soil2Config.cmake and soil2ConfigVersion.cmake
72 configure_file(soil2Config.cmake.in "${PROJECT_BINARY_DIR}/soil2Config.cmake" @ONLY)
73 configure_file(soil2ConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/soil2ConfigVersion.cmake" @ONLY)
74
75 # Install the soil2Config.cmake and soil2ConfigVersion.cmake
76 install(FILES
77 "${PROJECT_BINARY_DIR}/soil2Config.cmake"
78 "${PROJECT_BINARY_DIR}/soil2ConfigVersion.cmake"
79 DESTINATION "${INSTALL_CMAKE_DIR}"
80 )
81
82 # Install the export set for use with the install-tree
83 install(EXPORT soil2Targets DESTINATION "${INSTALL_CMAKE_DIR}")
84 else(INSTALL_HEADERS)
85 # Install the library object
86 install(TARGETS soil2 EXPORT soil2
87 ARCHIVE DESTINATION lib
88 LIBRARY DESTINATION lib
89 )
90 endif(INSTALL_HEADERS)