-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
executable file
·71 lines (58 loc) · 1.74 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
67
68
69
70
71
cmake_minimum_required(VERSION 2.8.12)
project(distortionizer)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
###
# Configuration Options
###
###
# CMake Modules
###
include(EnableExtraCompilerWarnings)
include(SetDefaultBuildType)
set_default_build_type(RelWithDebInfo)
include(MSVCMultipleProcessCompile)
include(CopyImportedTarget)
include(InstallRequiredSystemLibraries)
if(WIN32)
# Flat install for docs on Windows.
set(CMAKE_INSTALL_DOCDIR .)
endif()
include(GNUInstallDirs)
if(NOT CMAKE_INSTALL_DOCDIR)
set(CMAKE_INSTALL_DOCDIR ${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME})
endif()
###
# Dependencies
###
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5OpenGL REQUIRED)
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
# For generating documentation in HTML
if(WIN32)
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third-party/discount-windows-bins")
endif()
find_package(Markdown)
###
# Docs
###
# Convert the README to HTML if we can
set(MARKDOWN_INPUT README.md CONTRIBUTING.md)
if(MARKDOWN_FOUND)
include(UseMarkdown)
add_markdown_target(markdown_docs "${CMAKE_CURRENT_BINARY_DIR}" ${MARKDOWN_INPUT})
install_markdown_target(markdown_docs DESTINATION ${CMAKE_INSTALL_DOCDIR})
else()
install(FILES ${MARKDOWN_INPUT} DESTINATION ${CMAKE_INSTALL_DOCDIR})
endif()
install(FILES LICENSE NOTICE DESTINATION ${CMAKE_INSTALL_DOCDIR})
# Install the fragment shaders as documentation.
install(FILES vizard/ShaderTest.frag vizard/ShaderTest.vert DESTINATION ${CMAKE_INSTALL_DOCDIR})
###
# Building
###
add_subdirectory(calibration)