1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-10-06 09:17:07 +02:00

Change WindowsPipeTest to only compile

when tests are enabled
This commit is contained in:
Elias Steurer 2023-11-09 12:52:06 +01:00
parent e81a02d14c
commit 2008ff9235
2 changed files with 10 additions and 8 deletions

View File

@ -4,7 +4,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
include(GetProjectVersion)
get_project_version(PROJECT_VERSION)
# This be set before project()
# This must be set before project()
if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
set(SCREENPLAY_QML_MODULES_PATH "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ScreenPlay.app/Contents/MacOS/qml")

View File

@ -3,14 +3,16 @@
target_sources(
${PROJECT_NAME}
PRIVATE ScreenPlayGodotWallpaper.h
ScreenPlayGodotWallpaper.cpp
WindowsPipe.h
WindowsPipe.cpp
RegisterExtension.cpp)
ScreenPlayGodotWallpaper.cpp
WindowsPipe.h
WindowsPipe.cpp
RegisterExtension.cpp)
find_package(Catch2 CONFIG REQUIRED)
target_include_directories(${PROJECT_NAME} PRIVATE "src")
# Test app. Start WindowsPipeTestServer.py!
add_executable(WindowsPipeTest WindowsPipe.cpp WindowsPipe.h WindowsPipeTest.cpp)
target_link_libraries(WindowsPipeTest PRIVATE Catch2::Catch2 Catch2::Catch2WithMain)
target_include_directories(WindowsPipeTest PRIVATE "src")
if(${SCREENPLAY_TESTS})
add_executable(WindowsPipeTest WindowsPipe.cpp WindowsPipe.h WindowsPipeTest.cpp)
target_link_libraries(WindowsPipeTest PRIVATE Catch2::Catch2 Catch2::Catch2WithMain)
target_include_directories(WindowsPipeTest PRIVATE "src")
endif()