-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (46 loc) · 2.28 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
CMAKE_MINIMUM_REQUIRED (VERSION 2.6.2)
PROJECT (renderSound)
SET (APPLICATION_NAME "renderSound")
SET (APPLICATION_CODENAME "${PROJECT_NAME}")
SET (APPLICATION_COPYRIGHT_YEARS "2016")
SET (APPLICATION_VERSION_MAJOR 1)
SET (APPLICATION_VERSION_MINOR 0)
SET (APPLICATION_VERSION_PATCH 0)
SET (APPLICATION_VERSION_TYPE SNAPSHOT)
SET (APPLICATION_VERSION_STRING "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}-${APPLICATION_VERSION_TYPE}")
SET (APPLICATION_VENDOR_ID "de.sfn_kassel")
SET (APPLICATION_VENDOR_NAME "SFN Kassel (Robin Heinemann, Jaro Habiger)")
SET (APPLICATION_VENDOR_URL "www.sfn-kassel.de")
SET (APPLICATION_VENDOR_EMAIL "schallortung@gmail.com")
SET (APPLICATION_ID "${APPLICATION_VENDOR_ID}.${PROJECT_NAME}")
SET (CMAKE_VERBOSE_MAKEFILE 0)
SET (MAINFOLDER ${PROJECT_SOURCE_DIR})
SET (EXECUTABLE_OUTPUT_PATH "${MAINFOLDER}/bin")
LIST (APPEND CMAKE_PREFIX_PATH "${MAINFOLDER}")
INCLUDE_DIRECTORIES("${MAINFOLDER}/include")
FILE (GLOB_RECURSE CONFIGINPUTS1 include/*.in.h.cmake)
FILE (GLOB_RECURSE CONFIGINPUTS2 include/*.h.in.cmake)
FILE (GLOB_RECURSE CONFIGINPUTS3 src/*.in.h.cmake)
FILE (GLOB_RECURSE CONFIGINPUTS4 src/*.h.in.cmake)
LIST (APPEND CONFIGINPUTS "${CONFIGINPUTS1}")
LIST (APPEND CONFIGINPUTS "${CONFIGINPUTS2}")
LIST (APPEND CONFIGINPUTS "${CONFIGINPUTS3}")
LIST (APPEND CONFIGINPUTS "${CONFIGINPUTS4}")
FOREACH (CONFIGINPUT ${CONFIGINPUTS})
STRING (REPLACE ".in.h.cmake" ".h" CONFIGOUTPUT1 "${CONFIGINPUT}")
STRING (REPLACE ".h.in.cmake" ".h" CONFIGOUTPUT2 "${CONFIGOUTPUT1}")
CONFIGURE_FILE ("${CONFIGINPUT}" "${CONFIGOUTPUT2}")
ENDFOREACH (CONFIGINPUT ${CONFIGINPUTS})
FIND_PACKAGE(SFML COMPONENTS window system graphics network REQUIRED)
INCLUDE_DIRECTORIES(SFML_INCLUDE_DIR)
FIND_PACKAGE(OpenGL REQUIRED)
INCLUDE_DIRECTORIES(OPENGL_INCLUDE_DIR)
FIND_PACKAGE(GLEW REQUIRED)
INCLUDE_DIRECTORIES(GLEW_INCLUDE_DIR)
FIND_PACKAGE(OpenMP REQUIRED)
FIND_PACKAGE(OpenAL REQUIRED)
INCLUDE_DIRECTORIES(OPENAL_INCLUDE_DIR)
ADD_SUBDIRECTORY(src)
IF (EXISTS "${MAINFOLDER}/include/${PROJECT_NAME}" AND IS_DIRECTORY "${MAINFOLDER}/include/${PROJECT_NAME}")
INSTALL(DIRECTORY "${MAINFOLDER}/include/${PROJECT_NAME}" DESTINATION "include")
ENDIF (EXISTS "${MAINFOLDER}/include/${PROJECT_NAME}" AND IS_DIRECTORY "${MAINFOLDER}/include/${PROJECT_NAME}")