forked from LiXizhi/ParaCraftSDK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (42 loc) · 1.29 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
# Author: LiXizhi
# Contact: [email protected]
# Date: 2015.4.8
# Note:
cmake_minimum_required (VERSION 2.8)
# since the project is for documentation only, we will turn relative path on.
set(CMAKE_USE_RELATIVE_PATHS ON CACHE INTERNAL "" FORCE)
project (ParacraftRoot)
SET(ParaEngineClient_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/include/ParaEngine)
SET( Boost_DETAILED_FAILURE_MSG ON )
FIND_PACKAGE( Boost )
IF ( NOT Boost_FOUND )
MESSAGE( FATAL_ERROR
"Boost libraries (http://www.boost.org/) not found. "
)
ENDIF ( NOT Boost_FOUND )
MACRO(SUBDIRLIST result curdir)
FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
SET(dirlist "")
FOREACH(child ${children})
IF(IS_DIRECTORY ${curdir}/${child})
LIST(APPEND dirlist ${child})
ENDIF()
ENDFOREACH()
SET(${result} ${dirlist})
ENDMACRO()
MACRO(AddSubDirs dirpath)
SUBDIRLIST(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR}/${dirpath})
FOREACH(subdir ${SUBDIRS})
message(STATUS "path = ${subdir}")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dirpath}/${subdir}/CMakeLists.txt")
add_subdirectory(${dirpath}/${subdir})
endif()
ENDFOREACH()
ENDMACRO()
# src
# add_subdirectory (src)
# add all projects under samples/ folder
AddSubDirs(samples)
# AddSubDirs(_apps)
# AddSubDirs(_mod)
add_subdirectory(samples/plugins/HelloWorldCppDll)