-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathCMakeLists.txt
48 lines (41 loc) · 1.27 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 3.17)
project(sfxr-qt
VERSION 1.5.1
DESCRIPTION "Retro sound effect generator"
HOMEPAGE_URL "https://github.com/agateau/sfxr-qt"
)
include(CTest)
set(AUTHOR_NAME "Aurélien Gâteau")
set(AUTHOR_EMAIL "[email protected]")
set(ORGANIZATION_NAME "agateau.com")
set(INVERSE_ORGANIZATION_NAME "com.agateau")
set(APP_HUMAN_NAME "SFXR-Qt")
set(APP_NAME ${PROJECT_NAME})
set(APPLIB_NAME ${PROJECT_NAME}lib)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# Dependencies
find_package(Qt5 CONFIG REQUIRED Gui Quick Widgets Concurrent Test)
find_package(ECM REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
find_package(SDL REQUIRED)
include(3rdparty/qpropgen/cmake/qpropgen.cmake)
# Build flags
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
add_compile_options(-Wall -Woverloaded-virtual)
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
# Source dirs
if (USE_SYSTEM_CATCH2)
find_package(Catch2 REQUIRED)
else()
add_subdirectory(3rdparty/catch2)
endif()
add_subdirectory(src)
if (BUILD_TESTING)
enable_testing() # must come *before* adding tests directory
add_subdirectory(tests)
endif()
add_subdirectory(packaging)