-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDependency.cmake
83 lines (55 loc) · 2.05 KB
/
Dependency.cmake
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# ------ Set for ExternalProject ---------------- #
MESSAGE( STATUS "Setting for ExternalProject")
INCLUDE( ExternalProject )
MESSAGE( STATUS "Setting Done")
# ----------------------------------------------- #
# ------ Set Variables for Dependency ----------- #
MESSAGE( STATUS "Setting Variables for Dependency")
SET( DEP_INCLUDE )
SET( DEP_LIBS )
SET( DEP_LIST )
MESSAGE( STATUS "Setting Done")
# ----------------------------------------------- #
# ------ Set Options for Target Files ----------- #
MESSAGE( STATUS "Add Executable by platform")
## Include Header Directories for Target Files
IF ( WIN32 )
SET( STATIC_LIB lib )
SET( DYNAMIC_LIB dll)
ELSE ()
SET( STATIC_LIB a )
SET( DYNAMIC_LIB so )
ENDIF()
MESSAGE( STATUS "Setting Done" )
# ----------------------------------------------- #
#### Memory Pool ----------------------------------- #
MESSAGE(STATUS "Memory Project - Linking ...")
EXTERNALPROJECT_ADD(
MemoryProject
GIT_REPOSITORY GIT_REPOSITORY https://github.com/Winteradio/MemoryPool.git
GIT_TAG "v4.5.0"
PREFIX ${PREFIX_DIR}/MemoryProject
UPDATE_COMMAND "" PATCH_COMMAND "" TEST_COMMAND "" INSTALL_COMMAND ""
CMAKE_ARGS
-DPREFIX_DIR=${PREFIX_DIR}
-DINCLUDE_DIR=${INCLUDE_DIR}
-DLIB_DIR=${LIB_DIR}
-DBIN_DIR=${BIN_DIR}
-DARC_DIR=${ARC_DIR}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DBUILD_STATIC_LIBRARY=${BUILD_STATIC_LIBRARY}
-DINSTALL_DEMO_FILE=${INSTALL_DEMO_FILE}
-DINSTALL_MEMORY_MANAGER=ON
)
LIST( APPEND DEP_INCLUDE ${INCLUDE_DIR} )
LIST( APPEND DEP_LIST MemoryProject )
LIST( APPEND DEP_LIBS ${ARC_DIR}/MemoryProject.${STATIC_LIB} )
LIST( APPEND DEP_LIBS ${ARC_DIR}/LogProject.${STATIC_LIB} )
MESSAGE(STATUS "Memory Project - Done")
#### MemoryPool ----------------------------------- #
#### UUID --------------------------------------- #
MESSAGE( STATUS "RPCRT4-UUID - Linking ... ")
SET( UUID_LIBS Rpcrt4.lib )
LIST( APPEND DEP_LIBS ${UUID_LIBS} )
MESSAGE( STATUS "RPCRT4-UUID - Done")
#### UUID --------------------------------------- #