]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/cspice/CMakeLists.txt
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / cspice / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.1)
2 project(cspice LANGUAGES C)
3
4 set(SOVERSION 66)
5
6 # Include all *.c files from the library
7 file(GLOB CSPICE_SOURCE ${PROJECT_SOURCE_DIR}/cspice/src/cspice/*.c)
8 set(INCLUDE_PATH "${PROJECT_SOURCE_DIR}/cspice/include")
9
10 if (_STATIC_BUILD)
11 add_library(cspice STATIC ${CSPICE_SOURCE})
12 else()
13 add_library(cspice SHARED ${CSPICE_SOURCE})
14 endif()
15 target_include_directories(cspice PUBLIC "${INCLUDE_PATH}")
16
17 if (WIN32)
18 target_compile_definitions(cspice PUBLIC "_COMPLEX_DEFINED;MSDOS;OMIT_BLANK_CC;NON_ANSI_STDIO")
19 set_target_properties(cspice PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
20 elseif (UNIX)
21 target_compile_definitions(cspice PUBLIC "NON_UNIX_STDIO")
22 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
23 target_compile_options(cspice PUBLIC -m64 -ansi -fPIC)
24 elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
25 target_compile_options(cspice PUBLIC -m32 -ansi -fPIC)
26 endif()
27 target_compile_options(cspice PRIVATE -Wno-error=implicit-function-declaration)
28 endif ()
29
30 if (NOT _SKIP_HEADERS)
31 file(GLOB SPICE_HEADERS ${INCLUDE_PATH}/*.h)
32 install(FILES ${SPICE_HEADERS} DESTINATION include/cspice)
33 endif()
34
35 set_target_properties(
36 cspice
37 PROPERTIES SOVERSION ${SOVERSION}
38 )
39
40 install(
41 TARGETS cspice
42 EXPORT cspice
43 ARCHIVE DESTINATION lib
44 LIBRARY DESTINATION lib
45 RUNTIME DESTINATION bin
46 )