forked from PSI-Rockin/DobieStation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (25 loc) · 966 Bytes
/
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
cmake_minimum_required(VERSION 3.1)
project(DobieStation)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
string(REPLACE "-O3" "-O2" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") # fix Release build
set(THREADS_PREFER_PTHREAD_FLAG ON) # -pthreads on GNU-like compilers
# Externals
add_subdirectory(ext/zlib)
add_subdirectory(ext/lzma)
add_subdirectory(ext/libFLAC)
add_subdirectory(ext/libchdr)
# Shared packages
find_package(Threads REQUIRED)
# Modules
add_subdirectory(src/core)
add_subdirectory(src/qt)
if (MSVC)
# Use DobieQt as Startup Project instead of ALL_BUILD
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT DobieQt)
endif()
if (UNIX AND NOT APPLE)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/data/DobieStation.desktop.in
${CMAKE_CURRENT_BINARY_DIR}/DobieStation.desktop)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/DobieStation.desktop DESTINATION share/applications/)
endif()