Full rewrite of all CMakeLists
CMake now works on all platforms
This commit is contained in:
11
deps/CMakeLists.txt
vendored
Normal file
11
deps/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
if(WIN32)
|
||||
add_subdirectory(w32-pthreads)
|
||||
endif()
|
||||
|
||||
set(BUILD_DOCS FALSE CACHE INTERNAL "" FORCE)
|
||||
set(STATIC_CRT TRUE CACHE INTERNAL "" FORCE)
|
||||
set(BUILD_SHARED_LIBS FALSE CACHE INTERNAL "" FORCE)
|
||||
set(WITHOUT_TESTS TRUE CACHE INTERNAL "" FORCE)
|
||||
add_subdirectory(jansson)
|
||||
|
24
deps/jansson/CMakeLists.txt
vendored
24
deps/jansson/CMakeLists.txt
vendored
@@ -289,20 +289,20 @@ endif ()
|
||||
|
||||
# LIBRARY for linux
|
||||
# RUNTIME for windows (when building shared)
|
||||
install (TARGETS jansson
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
#install (TARGETS jansson
|
||||
# ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
# LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
# RUNTIME DESTINATION bin
|
||||
#)
|
||||
|
||||
install (FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/jansson_config.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/jansson.h
|
||||
DESTINATION include)
|
||||
#install (FILES
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/include/jansson_config.h
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/src/jansson.h
|
||||
# DESTINATION include)
|
||||
|
||||
install (FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/jansson.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
#install (FILES
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/jansson.pc
|
||||
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
|
||||
# For building Documentation (uses Sphinx)
|
||||
OPTION (BUILD_DOCS "Build documentation (uses python-sphinx)." ON)
|
||||
|
19
deps/w32-pthreads/CMakeLists.txt
vendored
Normal file
19
deps/w32-pthreads/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
project(w32-pthreads)
|
||||
|
||||
add_definitions(-D__CLEANUP_C)
|
||||
add_definitions(-DPTW32_BUILD)
|
||||
add_definitions(-DPTW32_STATIC_LIB)
|
||||
|
||||
set(w32-pthreads_SOURCES
|
||||
pthread.c)
|
||||
|
||||
set(w32-pthreads_HEADERS
|
||||
implement.h
|
||||
pthread.h
|
||||
sched.h
|
||||
semaphore.h)
|
||||
|
||||
add_library(w32-pthreads STATIC
|
||||
${w32-pthreads_SOURCES}
|
||||
${w32-pthreads_HEADERS})
|
||||
target_link_libraries(w32-pthreads)
|
Reference in New Issue
Block a user