-
Notifications
You must be signed in to change notification settings - Fork 21
/
CMakeLists.txt
executable file
·48 lines (39 loc) · 1.43 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
cmake_minimum_required(VERSION 3.12)
project(gsound)
# Set a default build type if none was specified
if( NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES )
message( STATUS "Setting build type to 'debug' as none was specified." )
set( CMAKE_BUILD_TYPE debug CACHE STRING "Choose the type of build." FORCE )
# Set the possible values of build type for cmake-gui
set_property( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "debug" "release" )
endif()
#set build directory
set(BUILD_DIRECTORY ${CMAKE_BUILD_TYPE})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing -Wno-deprecated")
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${BUILD_DIRECTORY}/lib)
set( CMAKE_CXX_FLAGS_DEBUG "-g -O0 -fPIC --coverage" )
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -fPIC" )
set( THREADS_PREFER_PTHREAD_FLAG ON )
find_package( Threads REQUIRED )
find_package( PkgConfig REQUIRED )
find_package( ZLIB REQUIRED )
pkg_check_modules( FFTW3 REQUIRED fftw3 )
# Add include directories
include_directories(
${CMAKE_SOURCE_DIR}/src/Om/Om\ Framework
${CMAKE_SOURCE_DIR}/src/Om/Om\ BVH
${CMAKE_SOURCE_DIR}/src/Om/Om\ Compression
${CMAKE_SOURCE_DIR}/src/Om/Om\ Resources
${CMAKE_SOURCE_DIR}/src/Om/Om\ Sound
${CMAKE_SOURCE_DIR}/src/GSound
${FFTW3_INCLUDEDIR}
)
# Add link directories
link_directories(
${FFTW3_LIBRARY_DIRS}
)
enable_testing()
add_subdirectory(lib/pybind11)
add_subdirectory(src/Om)
add_subdirectory(src/GSound)
add_subdirectory(src/pygsound)