Update CMakeLists.txt
This commit is contained in:
parent
3246587375
commit
5da68027e8
|
@ -25,6 +25,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules/)
|
||||||
#jsoncpp
|
#jsoncpp
|
||||||
find_package (Jsoncpp REQUIRED)
|
find_package (Jsoncpp REQUIRED)
|
||||||
include_directories(${JSONCPP_INCLUDE_DIRS})
|
include_directories(${JSONCPP_INCLUDE_DIRS})
|
||||||
|
message(STATUS "jsoncpp inc path:" ${JSONCPP_INCLUDE_DIRS})
|
||||||
|
|
||||||
#message(STATUS ${JSONCPP_LIBRARIES})
|
#message(STATUS ${JSONCPP_LIBRARIES})
|
||||||
if(NOT EXISTS ${JSONCPP_INCLUDE_DIRS}/json/version.h)
|
if(NOT EXISTS ${JSONCPP_INCLUDE_DIRS}/json/version.h)
|
||||||
message(STATUS "jsoncpp lib is too old.....stop")
|
message(STATUS "jsoncpp lib is too old.....stop")
|
||||||
|
@ -36,20 +38,23 @@ if(jsoncpp_ver LESS 1.7)
|
||||||
MESSAGE(STATUS "jsoncpp lib is too old,please get new version from https://github.com/open-source-parsers/jsoncpp")
|
MESSAGE(STATUS "jsoncpp lib is too old,please get new version from https://github.com/open-source-parsers/jsoncpp")
|
||||||
stop()
|
stop()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package (UUID REQUIRED)
|
find_package (UUID REQUIRED)
|
||||||
include_directories(${UUID_INCLUDE_DIR})
|
include_directories(${UUID_INCLUDE_DIR})
|
||||||
|
message(STATUS "uuid inc path:" ${UUID_INCLUDE_DIR})
|
||||||
|
|
||||||
find_package (OpenSSL)
|
find_package (OpenSSL)
|
||||||
if(OpenSSL_FOUND)
|
if(OpenSSL_FOUND)
|
||||||
#add_definitions(-DUSE_OPENSSL)
|
|
||||||
set(DR_DEFS "USE_OPENSSL;${DR_DEFS}")
|
|
||||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||||
|
message(STATUS "openssl inc path:" ${OPENSSL_INCLUDE_DIR})
|
||||||
else()
|
else()
|
||||||
aux_source_directory(${PROJECT_SOURCE_DIR}/lib/src/ssl_funcs DIR_SRCS)
|
aux_source_directory(${PROJECT_SOURCE_DIR}/lib/src/ssl_funcs DIR_SRCS)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "openssl inc path:" ${OPENSSL_INCLUDE_DIR})
|
|
||||||
|
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
include_directories(${ZLIB_INCLUDE_DIR})
|
include_directories(${ZLIB_INCLUDE_DIR})
|
||||||
|
message(STATUS "zlib inc path:" ${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "")
|
if(CMAKE_BUILD_TYPE STREQUAL "")
|
||||||
set(CMAKE_BUILD_TYPE Release)
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
|
@ -79,8 +84,6 @@ add_dependencies(drogon trantor makeVersion)
|
||||||
SET(CONFIG_HEADER "${PROJECT_SOURCE_DIR}/config.h")
|
SET(CONFIG_HEADER "${PROJECT_SOURCE_DIR}/config.h")
|
||||||
file(WRITE "${CONFIG_HEADER}" "#pragma once\n")
|
file(WRITE "${CONFIG_HEADER}" "#pragma once\n")
|
||||||
|
|
||||||
#get_directory_property(DR_DEFS COMPILE_DEFINITIONS)
|
|
||||||
|
|
||||||
file(APPEND "${CONFIG_HEADER}" "#include <trantor/utils/config.h>\n")
|
file(APPEND "${CONFIG_HEADER}" "#include <trantor/utils/config.h>\n")
|
||||||
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
|
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER)
|
||||||
if(CMAKE_BUILD_TYPE_LOWER STREQUAL release)
|
if(CMAKE_BUILD_TYPE_LOWER STREQUAL release)
|
||||||
|
|
Loading…
Reference in New Issue