mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 16:19:07 +08:00
4cbbcbddfd
* [vcpkg ci:osx] Remove brew install * add instructions for creating a new vagrant box * fix the vagrant scripts for the new box * finish fixing the setup * [mecab jxrlib] fix ports for CI mecab needed to use an actual ref that wasn't master, and jxrlib needed a patch for xcode 12 CLTs. Additionally, this fixes the mecab version to be a date, the date of the last commit, since `1.0` is not the correct version (mecab doesn't have released versions) * [many ports] fix compile with Xcode 12 CLTs This mostly means fixing errors on implicit-function-declaration, and removing some Werrors * alac-decoder * apr * argtable2 * arrow * hyperscan * mcpp * minizip * mosquitto * stormlib * [many ports] even more Xcode 12 CLT fixes * [jxrlib darknet] fix the last ports! (hopefully) * CRs, plus minor wip changes to osx scripts
47 lines
1.3 KiB
CMake
47 lines
1.3 KiB
CMake
cmake_minimum_required(VERSION 3.1)
|
|
project(cspice LANGUAGES C)
|
|
|
|
set(SOVERSION 66)
|
|
|
|
# Include all *.c files from the library
|
|
file(GLOB CSPICE_SOURCE ${PROJECT_SOURCE_DIR}/cspice/src/cspice/*.c)
|
|
set(INCLUDE_PATH "${PROJECT_SOURCE_DIR}/cspice/include")
|
|
|
|
if (_STATIC_BUILD)
|
|
add_library(cspice STATIC ${CSPICE_SOURCE})
|
|
else()
|
|
add_library(cspice SHARED ${CSPICE_SOURCE})
|
|
endif()
|
|
target_include_directories(cspice PUBLIC "${INCLUDE_PATH}")
|
|
|
|
if (WIN32)
|
|
target_compile_definitions(cspice PUBLIC "_COMPLEX_DEFINED;MSDOS;OMIT_BLANK_CC;NON_ANSI_STDIO")
|
|
set_target_properties(cspice PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
|
|
elseif (UNIX)
|
|
target_compile_definitions(cspice PUBLIC "NON_UNIX_STDIO")
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
target_compile_options(cspice PUBLIC -m64 -ansi -fPIC)
|
|
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
target_compile_options(cspice PUBLIC -m32 -ansi -fPIC)
|
|
endif()
|
|
target_compile_options(cspice PRIVATE -Wno-error=implicit-function-declaration)
|
|
endif ()
|
|
|
|
if (NOT _SKIP_HEADERS)
|
|
file(GLOB SPICE_HEADERS ${INCLUDE_PATH}/*.h)
|
|
install(FILES ${SPICE_HEADERS} DESTINATION include/cspice)
|
|
endif()
|
|
|
|
set_target_properties(
|
|
cspice
|
|
PROPERTIES SOVERSION ${SOVERSION}
|
|
)
|
|
|
|
install(
|
|
TARGETS cspice
|
|
EXPORT cspice
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib
|
|
RUNTIME DESTINATION bin
|
|
)
|