From d75e7aa63857f615eb2ee626cd845b47be35840f Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Mon, 18 Sep 2017 09:48:46 +0100 Subject: [PATCH] #6151 Add optional cmake install --- CMakeLists.txt | 2 ++ src/cmd/core/CMakeLists.txt | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ddfd79c3..673471b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,8 @@ cmake_minimum_required (VERSION 3.4) 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_EXTENSIONS OFF) set (CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/src/cmd/core/CMakeLists.txt b/src/cmd/core/CMakeLists.txt index 781af518..c485983e 100644 --- a/src/cmd/core/CMakeLists.txt +++ b/src/cmd/core/CMakeLists.txt @@ -17,8 +17,10 @@ add_executable(synergy-core main.cpp) target_link_libraries(synergy-core arch base client common io mt net ipc platform server core ${libs} ${OPENSSL_LIBS}) -if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - install (TARGETS synergy-core DESTINATION ${SYNERGY_BUNDLE_BINARY_DIR}) -elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") - install (TARGETS synergy-core DESTINATION bin) +if (SYNERGY_CORE_INSTALL) + if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + install (TARGETS synergy-core DESTINATION ${SYNERGY_BUNDLE_BINARY_DIR}) + elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + install (TARGETS synergy-core DESTINATION bin) + endif() endif()