aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-07-02 17:50:08 -0300
committerGitHub <noreply@github.com>2022-07-02 17:50:08 -0300
commitfb75c23f4e63077e12ca6821f66c1a55158e5d12 (patch)
tree5a3c5b6078f6acc43cfb354e1c235e80a4c21d7f /CMakeLists.txt
parent7f22994f6889706ba667baca32968787fe86ad44 (diff)
parent3d0740f80e8d2d1bd0f83c914b53d074d73e7c97 (diff)
downloadPrismLauncher-fb75c23f4e63077e12ca6821f66c1a55158e5d12.tar.gz
PrismLauncher-fb75c23f4e63077e12ca6821f66c1a55158e5d12.tar.bz2
PrismLauncher-fb75c23f4e63077e12ca6821f66c1a55158e5d12.zip
Merge pull request #784 from Scrumplex/refactor-cmake
Refactor tests
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 10 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b09e7fd2..5c5144f6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,14 +6,12 @@ if(WIN32)
endif()
project(Launcher)
-include(CTest)
string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BUILD_DIR}" IS_IN_SOURCE_BUILD)
if(IS_IN_SOURCE_BUILD)
message(FATAL_ERROR "You are building the Launcher in-source. Please separate the build tree from the source tree.")
endif()
-
##################################### Set CMake options #####################################
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
@@ -63,6 +61,16 @@ if(ENABLE_LTO)
endif()
endif()
+option(BUILD_TESTING "Build the testing tree." ON)
+
+find_package(ECM REQUIRED NO_MODULE)
+set(CMAKE_MODULE_PATH "${ECM_MODULE_PATH};${CMAKE_MODULE_PATH}")
+include(CTest)
+include(ECMAddTests)
+if (BUILD_TESTING)
+ enable_testing()
+endif()
+
##################################### Set Application options #####################################
######## Set URLs ########
@@ -102,8 +110,6 @@ set(Launcher_MATRIX_URL "https://matrix.to/#/#polymc:matrix.org" CACHE STRING "U
# Discord URL
set(Launcher_DISCORD_URL "https://discord.gg/Z52pwxWCHP" CACHE STRING "URL for the Discord guild.")
-
-
# Subreddit URL
set(Launcher_SUBREDDIT_URL "https://www.reddit.com/r/PolyMCLauncher/" CACHE STRING "URL for the subreddit.")