mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
Updated cmake
This commit is contained in:
parent
eb8ad4b685
commit
3cb9222054
@ -39,11 +39,11 @@ include(${CMAKE_SOURCE_DIR}/cmake/dependencies.cmake)
|
||||
# this can be alternatively (and as recommended way) done with target_include_directories()
|
||||
if(BUILD_EXAMPLES OR BUILD_TESTING)
|
||||
set(PROJECT_INCLUDE_DIR
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
include_directories("${PROJECT_INCLUDE_DIR}")
|
||||
include_directories("${PROJECT_SOURCE_DIR}")
|
||||
include_directories("${CMAKE_SOURCE_DIR}")
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}") # To include crow_all.h
|
||||
endif()
|
||||
|
||||
@ -51,11 +51,11 @@ endif()
|
||||
# Define Targets
|
||||
#####################################
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/crow_all.h
|
||||
COMMAND python ${PROJECT_SOURCE_DIR}/scripts/merge_all.py
|
||||
${PROJECT_SOURCE_DIR}/include
|
||||
COMMAND python ${CMAKE_SOURCE_DIR}/scripts/merge_all.py
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_BINARY_DIR}/crow_all.h
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/include/*.h ${PROJECT_SOURCE_DIR}/include/crow/*.h ${PROJECT_SOURCE_DIR}/include/crow/middlewares/*.h
|
||||
DEPENDS ${CMAKE_SOURCE_DIR}/include/*.h ${CMAKE_SOURCE_DIR}/include/crow/*.h ${CMAKE_SOURCE_DIR}/include/crow/middlewares/*.h
|
||||
)
|
||||
|
||||
# Amalgamation
|
||||
|
@ -1,9 +1,6 @@
|
||||
# Dependencies
|
||||
|
||||
if(BUILD_EXAMPLES OR BUILD_TESTING)
|
||||
find_package(Tcmalloc)
|
||||
find_package(Threads)
|
||||
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
message("Found ccache ${CCACHE_FOUND}")
|
||||
@ -13,6 +10,9 @@ if(BUILD_EXAMPLES OR BUILD_TESTING)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||
endif(CCACHE_FOUND)
|
||||
|
||||
find_package(Tcmalloc)
|
||||
find_package(Threads)
|
||||
|
||||
if (MSVC)
|
||||
set(Boost_USE_STATIC_LIBS ON)
|
||||
find_package( Boost 1.52 COMPONENTS system thread regex REQUIRED )
|
||||
@ -32,5 +32,4 @@ if(BUILD_EXAMPLES)
|
||||
if(OPENSSL_FOUND)
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user