-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
59 lines (44 loc) · 2.04 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
PROJECT(MRDev)
#cmake_minimum_required(VERSION 2.8)
########### Find MRCore
IF (WIN32)
SET(CMAKE_INSTALL_PREFIX "C:/mrcore" CACHE PATH "FOO install prefix" FORCE)
ELSE(WIN32)
SET(CMAKE_INSTALL_PREFIX /usr/local/mrcore)
ENDIF(WIN32)
MESSAGE(STATUS "Default install directory is: " ${CMAKE_INSTALL_PREFIX})
find_path( MRCORE_DIR include/mrcore/mrcore.h ${CMAKE_INSTALL_PREFIX} )
INCLUDE_DIRECTORIES(${MRCORE_DIR}/include)
INCLUDE_DIRECTORIES(${MRCORE_DIR}/include/mrcore)
MESSAGE (STATUS "MRCore include folder is "${MRCORE_DIR}/include)
LINK_DIRECTORIES(${MRCORE_DIR}/lib)
####################################################################################################
#
# Each library must handle its owns includes to other libraries in this MRDev, as well
# as defining which headers to install.
#
####################################################################################################
ADD_SUBDIRECTORY(libraries)
####################################################################################################
#
# It is normal than APPs and TESTS in this MRDev use the libraries in this MRDev, so we set
# the include directories by default for all libraries
#
####################################################################################################
SET(curdir ${CMAKE_CURRENT_SOURCE_DIR}/libraries)
FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
FOREACH(child ${children})
IF(IS_DIRECTORY ${curdir}/${child} AND NOT ${child} STREQUAL "CMakeFiles")
INCLUDE_DIRECTORIES( ${curdir}/${child} )
INCLUDE_DIRECTORIES( ${curdir}/${child}/include )
ENDIF()
ENDFOREACH()
ADD_SUBDIRECTORY(apps)
ADD_SUBDIRECTORY(tests) #somthing to play, but not to install for everybody
####################################################################################################
#
# INSTALL (TODO: Data)
#
####################################################################################################
FILE(GLOB datafiles "${CMAKE_CURRENT_SOURCE_DIR}/data/*")
INSTALL(FILES ${datafiles} DESTINATION "${CMAKE_INSTALL_PREFIX}/data")