-
Notifications
You must be signed in to change notification settings - Fork 20
/
CMakeLists.txt
66 lines (58 loc) · 1.82 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
58
59
60
61
62
63
64
65
66
cmake_minimum_required(VERSION 3.11)
project(binary_viewer CXX)
set(CMAKE_CXX_STANDARD 14)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed
set(CMAKE_AUTOMOC ON)
# Instruct CMake to include project Qt resources as needed
set(CMAKE_AUTORCC ON)
# Create code from a list of Qt designer ui files
set(CMAKE_AUTOUIC ON)
include_directories(.)
if(MSVC)
# Similar to -Wall -Wextra
add_compile_options(/W3 /WX)
# Type conversion warnings
add_compile_options("/wd4244") # type conversion
add_compile_options("/wd4305") # type truncation
add_compile_options("/wd4267") # type conversion, loss of data
elseif(CMAKE_COMPILER_IS_GNUCXX)
add_compile_options(-Wall -Wextra -Wno-sign-compare)
endif(MSVC)
add_executable(binary_viewer
bayer.cpp
bayer.h
binary_viewer.cpp
binary_viewer.h
dot_plot.cpp
dot_plot.h
plot_view.cpp
plot_view.h
hilbert.cpp
hilbert.h
histogram_calc.cpp
histogram_calc.h
overall_view.cpp
overall_view.h
histogram_2d_view.cpp
histogram_2d_view.h
image_view.cpp
image_view.h
main.cpp
main_app.cpp
main_app.h
version.cpp
version.h
histogram_3d_view.cpp
histogram_3d_view.h
bin_viewer.qrc)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui OpenGL)
target_link_libraries(binary_viewer Qt5::Core Qt5::Widgets Qt5::Gui Qt5::OpenGL)
if(MSVC)
# On Windows the dependency is provided by the glui package
find_package(glui CONFIG REQUIRED)
target_link_libraries(binary_viewer glui::glui glui::glui_static)
else()
target_link_libraries(binary_viewer GL GLU)
endif(MSVC)