modify CMakeLists.txt
This commit is contained in:
parent
7d8f1ec7fa
commit
fd4f43816a
|
@ -76,25 +76,26 @@ install(TARGETS drogon DESTINATION lib)
|
||||||
|
|
||||||
file(GLOB trantor_net_headers "${CMAKE_CURRENT_SOURCE_DIR}/lib/inc/drogon/*.h")
|
file(GLOB trantor_net_headers "${CMAKE_CURRENT_SOURCE_DIR}/lib/inc/drogon/*.h")
|
||||||
install(FILES ${trantor_net_headers} DESTINATION include/drogon)
|
install(FILES ${trantor_net_headers} DESTINATION include/drogon)
|
||||||
file(WRITE "./config.h" "const char definitions[]=\"")
|
SET(CONFIG_HEADER "${PROJECT_SOURCE_DIR}/config.h")
|
||||||
|
file(WRITE "${CONFIG_HEADER}" "const char definitions[]=\"")
|
||||||
add_dependencies(drogon trantor)
|
add_dependencies(drogon trantor)
|
||||||
add_dependencies(drogon makeVersion)
|
add_dependencies(drogon makeVersion)
|
||||||
|
|
||||||
get_directory_property(DEFS COMPILE_DEFINITIONS)
|
get_directory_property(DEFS COMPILE_DEFINITIONS)
|
||||||
foreach(loop_var ${DEFS})
|
foreach(loop_var ${DEFS})
|
||||||
#message(STATUS "definitions " ${loop_var})
|
#message(STATUS "definitions " ${loop_var})
|
||||||
file(APPEND "./config.h" "-D" ${loop_var} " ")
|
file(APPEND "${CONFIG_HEADER}" "-D" ${loop_var} " ")
|
||||||
endforeach(loop_var)
|
endforeach(loop_var)
|
||||||
file(APPEND "./config.h" "\";")
|
file(APPEND "${CONFIG_HEADER}" "\";")
|
||||||
file(APPEND "./config.h" "\n" "const char compileFlags[]=\"" ${CMAKE_CXX_FLAGS} "\";")
|
file(APPEND "${CONFIG_HEADER}" "\n" "const char compileFlags[]=\"" ${CMAKE_CXX_FLAGS} "\";")
|
||||||
|
|
||||||
get_target_property(INS drogon INCLUDE_DIRECTORIES)
|
get_target_property(INS drogon INCLUDE_DIRECTORIES)
|
||||||
file(APPEND "./config.h" "\nconst char includeDirs[]=\"")
|
file(APPEND "${CONFIG_HEADER}" "\nconst char includeDirs[]=\"")
|
||||||
foreach(loop_var ${INS})
|
foreach(loop_var ${INS})
|
||||||
file(APPEND "./config.h" "-I" ${loop_var} " ")
|
file(APPEND "${CONFIG_HEADER}" "-I" ${loop_var} " ")
|
||||||
endforeach(loop_var)
|
endforeach(loop_var)
|
||||||
file(APPEND "./config.h" "\";\n")
|
file(APPEND "${CONFIG_HEADER}" "\";\n")
|
||||||
EXEC_PROGRAM(${PROJECT_SOURCE_DIR}/update_config.sh ARGS "${PROJECT_SOURCE_DIR}/config.h ${PROJECT_SOURCE_DIR}/lib/inc/drogon/config.h")
|
EXEC_PROGRAM(${PROJECT_SOURCE_DIR}/update_config.sh ARGS "${CONFIG_HEADER} ${PROJECT_SOURCE_DIR}/lib/inc/drogon/config.h")
|
||||||
|
|
||||||
if (MAKETEST STREQUAL YES)
|
if (MAKETEST STREQUAL YES)
|
||||||
ADD_SUBDIRECTORY(tests)
|
ADD_SUBDIRECTORY(tests)
|
||||||
|
|
|
@ -105,7 +105,7 @@ void SharedLibManager::managerLibs()
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::ofstream fout(lockFile);
|
std::ofstream fout(lockFile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue