mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-30 04:37:50 +02:00
Implement #243, separate core/client (PCH support dropped for now)
This commit is contained in:
parent
bdaf2c16aa
commit
8ac9520dfd
153 changed files with 360 additions and 20020 deletions
61
client/CMakeLists.txt
Normal file
61
client/CMakeLists.txt
Normal file
|
@ -0,0 +1,61 @@
|
|||
set(CLIENT_SRC
|
||||
"BOB.cpp"
|
||||
"ClientContext.cpp"
|
||||
"Daemon.cpp"
|
||||
"HTTPProxy.cpp"
|
||||
"HTTPServer.cpp"
|
||||
"I2PService.cpp"
|
||||
"i2pcontrol/I2PControl.cpp"
|
||||
"i2pcontrol/I2PControlServer.cpp"
|
||||
"I2PTunnel.cpp"
|
||||
"SAM.cpp"
|
||||
"SOCKS.cpp"
|
||||
"i2p.cpp"
|
||||
)
|
||||
|
||||
include_directories(".")
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
list(APPEND CLIENT_SRC "DaemonLinux.cpp")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
list(APPEND CLIENT_SRC "DaemonLinux.cpp")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
list(APPEND CLIENT_SRC "DaemonLinux.cpp")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
list(APPEND CLIENT_SRC "DaemonWin32.cpp")
|
||||
list(APPEND CLIENT_SRC "Win32Service.cpp")
|
||||
endif()
|
||||
|
||||
if(WITH_BINARY)
|
||||
add_executable(${CLIENT_NAME} ${CLIENT_SRC})
|
||||
if(NOT MSVC) # FIXME: incremental linker file name (.ilk) collision for dll & exe
|
||||
set_target_properties(${CLIENT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}")
|
||||
if(WITH_STATIC)
|
||||
set_target_properties(${CLIENT_NAME} PROPERTIES LINK_FLAGS "-static" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_HARDENING AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set_target_properties(${CLIENT_NAME} PROPERTIES LINK_FLAGS "-z relro -z now")
|
||||
endif()
|
||||
|
||||
# FindBoost pulls pthread for thread which is broken for static linking
|
||||
# (at least on Ubuntu 15.04)
|
||||
list(GET Boost_LIBRARIES -1 LAST_Boost_LIBRARIES)
|
||||
if(${LAST_Boost_LIBRARIES} MATCHES ".*pthread.*")
|
||||
list(REMOVE_AT Boost_LIBRARIES -1)
|
||||
endif()
|
||||
target_link_libraries(
|
||||
${CLIENT_NAME} ${CORE_NAME}
|
||||
${DL_LIB} ${Boost_LIBRARIES} ${CRYPTO++_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
|
||||
install(TARGETS
|
||||
${CLIENT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
if(MSVC)
|
||||
install(FILES
|
||||
$<TARGET_PDB_FILE:${CLIENT_NAME}> DESTINATION "bin" CONFIGURATIONS DEBUG
|
||||
)
|
||||
endif()
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue