From 791f7774a5bf86c2783b3a83487a723424bea956 Mon Sep 17 00:00:00 2001 From: th-2021 <90853655+th-2021@users.noreply.github.com> Date: Thu, 11 Aug 2022 10:05:54 +0200 Subject: [PATCH] [cmake] Split OTRGui into it's own target (#1116) --- Jenkinsfile | 1 + OTRGui/CMakeLists.txt | 2 +- scripts/linux/appimage/build.sh | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7f24cb317..bda64b9dd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -63,6 +63,7 @@ pipeline { unstash 'assets' bat """ "${env.CMAKE}" -S . -B "build\\${env.PLATFORM}" -G "Visual Studio 17 2022" -T ${env.TOOLSET} -A ${env.PLATFORM} -D Python_EXECUTABLE=${env.PYTHON} -D CMAKE_BUILD_TYPE:STRING=Release + "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --target OTRGui --config Release "${env.CMAKE}" --build ".\\build\\${env.PLATFORM}" --config Release cd ".\\build\\${env.PLATFORM}" "${env.CPACK}" -G ZIP diff --git a/OTRGui/CMakeLists.txt b/OTRGui/CMakeLists.txt index a1562beb4..d3b1d422f 100644 --- a/OTRGui/CMakeLists.txt +++ b/OTRGui/CMakeLists.txt @@ -38,7 +38,7 @@ file(GLOB_RECURSE HEADERS src/*.h) file(GLOB_RECURSE SOURCES src/*.cpp) file(GLOB_RECURSE C_SOURCES src/*.c) -add_executable(${PROJECT_NAME} ${SOURCES} ${C_SOURCES} ${HEADERS} ${APP_ICON_RESOURCE_WINDOWS}) +add_executable(${PROJECT_NAME} EXCLUDE_FROM_ALL ${SOURCES} ${C_SOURCES} ${HEADERS} ${APP_ICON_RESOURCE_WINDOWS}) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") use_props(${PROJECT_NAME} "${CMAKE_CONFIGURATION_TYPES}" "${DEFAULT_CXX_PROPS}") diff --git a/scripts/linux/appimage/build.sh b/scripts/linux/appimage/build.sh index 86f46fb90..6a98b1924 100755 --- a/scripts/linux/appimage/build.sh +++ b/scripts/linux/appimage/build.sh @@ -1,6 +1,7 @@ #!/bin/bash cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release +cmake --build build-cmake --target OTRGui -- cmake --build build-cmake --config Release -- (cd build-cmake && cpack -G External)