#6151 Add optional cmake install
This commit is contained in:
parent
e674c0e63b
commit
d75e7aa638
|
@ -17,6 +17,8 @@
|
||||||
cmake_minimum_required (VERSION 3.4)
|
cmake_minimum_required (VERSION 3.4)
|
||||||
project (synergy-core C CXX)
|
project (synergy-core C CXX)
|
||||||
|
|
||||||
|
option (SYNERGY_CORE_INSTALL "Enable Synergy Core install (Mac and Linux)" OFF)
|
||||||
|
|
||||||
set (CMAKE_CXX_STANDARD 14)
|
set (CMAKE_CXX_STANDARD 14)
|
||||||
set (CMAKE_CXX_EXTENSIONS OFF)
|
set (CMAKE_CXX_EXTENSIONS OFF)
|
||||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
|
@ -17,8 +17,10 @@ add_executable(synergy-core main.cpp)
|
||||||
target_link_libraries(synergy-core
|
target_link_libraries(synergy-core
|
||||||
arch base client common io mt net ipc platform server core ${libs} ${OPENSSL_LIBS})
|
arch base client common io mt net ipc platform server core ${libs} ${OPENSSL_LIBS})
|
||||||
|
|
||||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
if (SYNERGY_CORE_INSTALL)
|
||||||
install (TARGETS synergy-core DESTINATION ${SYNERGY_BUNDLE_BINARY_DIR})
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
install (TARGETS synergy-core DESTINATION ${SYNERGY_BUNDLE_BINARY_DIR})
|
||||||
install (TARGETS synergy-core DESTINATION bin)
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||||
|
install (TARGETS synergy-core DESTINATION bin)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue