CMakeLists.txt

Thu, 14 Jan 2016 12:14:06 +0200

author
cemkalyoncu <cemkalyoncu@gmail.com>
date
Thu, 14 Jan 2016 12:14:06 +0200
branch
4.x-dev
changeset 814
8d275aa2f4cb
parent 810
36c313140b84
child 815
c0466d54ffb6
permissions
-rw-r--r--

* CMake packaging

814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
1 cmake_minimum_required(VERSION 2.8.3)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
2
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
3 project(Gorgon)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
4
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
5 set(GORGON_MAJOR_VERSION 4)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
6 set(GORGON_MINOR_VERSION 0)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
7 set(GORGON_PATCH_VERSION 0)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
8 set(GORGON_VERSION_ALPHA 1)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
9 set(GORGON_VERSION ${GORGON_MAJOR_VERSION}.${GORGON_MINOR_VERSION}.${GORGON_PATCH_VERSION})
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
10
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
11 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Lib)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
12 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Lib)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
13 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Bin)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
14 set(CMAKE_TESTING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Testing)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
15 set(CMAKE_DOCUMENT_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/Docs)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
16 set(PROJECT_BINARY_DIR ${CMAKE_CURRENT_LIST_DIR}/Bin)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
17 set(PROJECT_PACKAGE_DIR ${CMAKE_CURRENT_LIST_DIR}/Package)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
18
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
19 #### SETTINGS ####
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
20
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
21 option(OPENGL "Use OpenGL as underlying GL. Should be ON for now." ON)
199
e6acf22bd64f * Merged with 3.1 branch
cemkalyoncu
parents:
diff changeset
22
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
23 option(AUDIO "Enable audio." ON)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
24
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
25 option(GORGON_FAST_ANY "Make any to work fast by removing empty checks. This will only apply to release mode." OFF)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
26
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
27 option(SCRIPTING "Enable scripting module." ON)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
28
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
29 option(NO_LOGGING "Disables logger globally. If set, unit tests for logging will fail." OFF)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
30
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
31 option(TESTMODE "Enable test mode." OFF)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
32
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
33 option(DOCUMENTATION_GRAPHS "Enable graphs in documentation." OFF)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
34
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
35 option(UNIT_TESTS "Enable compiling of unit tests." OFF)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
36
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
37 set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
38
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
39 set(INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
40
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
41 set(INSTALL_include_DIR include CACHE PATH "Installation directory for header files")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
42
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
43 ######################
199
e6acf22bd64f * Merged with 3.1 branch
cemkalyoncu
parents:
diff changeset
44
416
7c04a3e33dcc * Partial testing system
cemkalyoncu
parents: 415
diff changeset
45
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
46 if(AUDIO AND NOT AUDIOLIB)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
47 if(WIN32)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
48 set(AUDIOLIB )
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
49 else()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
50 set(AUDIOLIB PULSE)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
51 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
52 endif()
539
62eafd61625e * Builtin types
cemkalyoncu
parents: 497
diff changeset
53
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
54 if(DOCUMENTATION_GRAPHS)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
55 set(DOXYGRAPH YES)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
56 else()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
57 set(DOXYGRAPH NO)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
58 endif()
752
99dffbaec693 * Function to instance member mapping
cemkalyoncu
parents: 579
diff changeset
59
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
60 if(TESTMODE)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
61 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
62 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
63
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
64 if(NO_LOGGING)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
65 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNO_LOGGING")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
66 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
67
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
68 if(GORGON_FAST_ANY)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
69 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DGORGON_FAST_ANY")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
70 endif()
808
94ef6d47c4fd * Skeleton for PulseAudio
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 795
diff changeset
71
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
72 if(OPENGL)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
73 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENGL")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
74 endif()
752
99dffbaec693 * Function to instance member mapping
cemkalyoncu
parents: 579
diff changeset
75
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
76 if(UNIX)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
77 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLINUX -Werror=return-type")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
78 else()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
79 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
80 endif()
810
36c313140b84 * Logger module
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 808
diff changeset
81
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
82 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGLM_SWIZZLE -DGLM_FORCE_RADIANS")
416
7c04a3e33dcc * Partial testing system
cemkalyoncu
parents: 415
diff changeset
83
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
84 # Make relative paths absolute (needed later on)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
85 foreach(p LIB BIN INCLUDE CMAKE)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
86 set(var INSTALL_${p}_DIR)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
87 if(NOT IS_ABSOLUTE "${${var}}")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
88 set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
89 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
90 endforeach()
469
204f261413ae * An empty GL module marking separation for GL related function from Graphics module
cemkalyoncu
parents: 450
diff changeset
91
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
92 include(Scripts/Compiler.cmake)
431
1c4ff08ac080 * String tokenizer is documented
cemkalyoncu
parents: 421
diff changeset
93
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
94 include(Scripts/Macros.cmake)
415
001cd0eb15db * CMake scripts does not need to specify paths anymore
cemkalyoncu
parents: 414
diff changeset
95
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
96 set(DebugLibs "")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
97 set(OptimizedLibs "")
795
4368c8f894af * Visual studio fixes for Struct definition (partial)
cemkalyoncu
parents: 793
diff changeset
98
764
7c71952bd75b Gorgon code base has been moved to Source/Gorgon
cengizkandemir
parents: 752
diff changeset
99 StartSource(Source/Gorgon)
414
4a78d100caae * Filesystem
cemkalyoncu
parents: 409
diff changeset
100
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
101 if(UNIT_TESTS)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
102 include(Scripts/Testing.cmake)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
103 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
104
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
105 include(Scripts/Doxygen.cmake)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
106
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
107 add_library(Gorgon STATIC ${All})
416
7c04a3e33dcc * Partial testing system
cemkalyoncu
parents: 415
diff changeset
108
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
109 install(TARGETS Gorgon
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
110 EXPORT GorgonTargets
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
111 ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
112 PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}/Gorgon"
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
113 )
416
7c04a3e33dcc * Partial testing system
cemkalyoncu
parents: 415
diff changeset
114
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
115 include_directories(Source/External)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
116 include_directories(Source)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
117
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
118 target_link_libraries(Gorgon ${Libs})
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
119
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
120 if(NOT DebugLibs STREQUAL "")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
121 target_link_libraries(Gorgon debug ${DebugLibs})
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
122 endif()
448
aa7c23353732 * Event is completed
cemkalyoncu
parents: 431
diff changeset
123
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
124 if(NOT OptimizedLibs STREQUAL "")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
125 target_link_libraries(Gorgon optimized ${OptimizedLibs})
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
126 endif()
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
127
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
128 export(TARGETS Gorgon FILE "${PROJECT_PACKAGE_DIR}/GorgonTargets.cmake")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
129 export(PACKAGE Gorgon)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
130
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
131 file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}"
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
132 "${INSTALL_INCLUDE_DIR}")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
133
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
134 set(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/Source")
793
a5471d749e9b * Initial work on structure definition
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 792
diff changeset
135
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
136 configure_file(Scripts/GorgonConfig.cmake.in
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
137 "${PROJECT_PACKAGE_DIR}/GorgonConfig.cmake" @ONLY)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
138
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
139 set(CONF_INCLUDE_DIRS "\${GORGON_CMAKE_DIR}/${REL_INCLUDE_DIR}")
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
140 configure_file(Scripts/GorgonConfig.cmake.in
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
141 "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/GorgonConfig.cmake" @ONLY)
793
a5471d749e9b * Initial work on structure definition
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 792
diff changeset
142
814
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
143 configure_file(Scripts/GorgonConfigVersion.cmake.in
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
144 "${PROJECT_PACKAGE_DIR}/GorgonConfigVersion.cmake" @ONLY)
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
145
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
146 install(FILES
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
147 "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/GorgonConfig.cmake"
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
148 "${PROJECT_PACKAGE_DIR}/GorgonConfigVersion.cmake"
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
149 DESTINATION "${INSTALL_CMAKE_DIR}"
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
150 )
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
151
8d275aa2f4cb * CMake packaging
cemkalyoncu <cemkalyoncu@gmail.com>
parents: 810
diff changeset
152 install(EXPORT GorgonTargets DESTINATION "${INSTALL_CMAKE_DIR}")

mercurial