forked from ossia/libossia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
56 lines (44 loc) · 1.34 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
set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
"${CMAKE_MODULE_PATH}"
)
if(OSSIA_SDK)
list(APPEND CMAKE_PREFIX_PATH "${OSSIA_SDK}/portaudio/lib/cmake/portaudio")
endif()
if(APPLE AND EXISTS /usr/local/opt/qt5)
list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
endif()
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project(OSSIA C CXX)
set(CMAKE_POSITION_INDEPENDENT_CODE 1)
find_package(Threads)
find_package(Qt5 5.3 COMPONENTS Core)
# Options
## FIXME : the following variable doesn't have a type
## BUT cmake seems to suffer from a bug here
## with `set(OSSIA_3RDPARTY_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty" CACHE PATH "" INTERNAL)`
## the variable looks like : `/tmp/DpvCam/3rdparty/libossia/3rdparty;CACHE;STRING;;INTERNAL`
## which is a list instead of a single PATH value
## at least with CMake 15.2
set(OSSIA_3RDPARTY_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty" CACHE "" INTERNAL)
include(OssiaOptions)
# Dependencies
include(OssiaDeps)
# Configuration
include(OssiaConfiguration)
cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0056 NEW)
cmake_policy(SET CMP0069 NEW)
# Main library
add_subdirectory(src)
# Examples & tests
if(OSSIA_EXAMPLES)
add_subdirectory(examples)
endif()
if(OSSIA_TESTING)
enable_testing()
add_subdirectory(tests)
endif()
if(OSSIA_GENVAR)
add_subdirectory(tools/gen_variant)
endif()