-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
57 lines (47 loc) · 1.47 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
49
50
51
52
53
54
55
56
57
project(NoLifeExplorer)
cmake_minimum_required(VERSION 2.8.12)
set(NOLIFEEXPLORER_RELEASE 9)
set(NOLIFEEXPLORER_CODENAME "Rusted Edge")
configure_file(
"${PROJECT_SOURCE_DIR}/config.hpp.in"
"${PROJECT_BINARY_DIR}/config.hpp"
)
# Detect compiler
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(USING_GCC TRUE)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(USING_CLANG TRUE)
endif()
# For GCC and Clang, enable C++14 support and add some other flags
if(USING_GCC OR USING_CLANG)
add_compile_options(-std=c++14 -pedantic -Wall -Wextra -Wconversion
-Wshadow -Wmissing-declarations -Wnon-virtual-dtor)
if(SANITIZE)
add_compile_options(-fsanitize=${SANITIZE})
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -fsanitize=${SANITIZE}")
endif()
endif()
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
find_package(NoLifeNx REQUIRED)
include_directories(${NOLIFENX_INCLUDE_DIR})
find_package(Qt5Widgets REQUIRED)
find_package(SFML 2 COMPONENTS audio system REQUIRED)
include_directories(${SFML_INCLUDE_DIR})
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_executable(nlexplorer
src/AudioPlayerWidget.cpp
src/AudioPlayerWidget.hpp
src/AudioStream.cpp
src/AudioStream.hpp
src/MainWindow.cpp
src/MainWindow.hpp
src/NodeItem.cpp
src/NodeItem.hpp
src/main.cpp
src/nodeUtil.cpp
src/nodeUtil.hpp
)
qt5_use_modules(nlexplorer Widgets)
target_link_libraries(nlexplorer ${NOLIFENX_LIBRARY} ${SFML_LIBRARIES} lz4 mpg123)