]> git.mxchange.org Git - simgear.git/blob - CMakeLists.txt
Initial commit for a DNS service resolver
[simgear.git] / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.8.11)
2
3 if(COMMAND cmake_policy)
4    if(POLICY CMP0054)
5        cmake_policy(SET CMP0054 NEW)
6    endif()
7    if(POLICY CMP0042)
8        cmake_policy(SET CMP0042 NEW)
9    endif()
10 endif()
11
12 include (CheckFunctionExists)
13 include (CheckIncludeFile)
14 include (CheckLibraryExists)
15 include (CheckCXXSourceCompiles)
16 include (CheckCXXCompilerFlag)
17 include (GenerateExportHeader)
18
19 # using 10.7 because boost requires libc++ and 10.6 doesn't include it
20 set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
21
22 # only relevant for building shared libs but let's set it regardless
23 set(CMAKE_OSX_RPATH 1)
24
25 project(SimGear)
26
27 # read 'version' file into a variable (stripping any newlines or spaces)
28 file(READ version versionFile)
29 string(STRIP ${versionFile} SIMGEAR_VERSION)
30
31 set(FIND_LIBRARY_USE_LIB64_PATHS ON)
32
33 # use simgear version also as the SO version (if building SOs)
34 SET(SIMGEAR_SOVERSION ${SIMGEAR_VERSION})
35
36 # Warning when build is not an out-of-source build.
37 string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" InSourceBuild)
38 if(InSourceBuild)
39     message(WARNING  "Avoid building inside the source tree!")
40     message(WARNING  "Create a separate build directory instead (i.e. 'sgbuild') and call CMake from there: ")
41     message(WARNING  "  mkdir ../sgbuild && cd ../sgbuild && cmake ${CMAKE_SOURCE_DIR}")
42 endif(InSourceBuild)
43
44 #packaging
45 SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/COPYING")
46 SET(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README")
47 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Simulation support libraries for FlightGear and related projects")
48 SET(CPACK_PACKAGE_VENDOR "The FlightGear project")
49 SET(CPACK_GENERATOR "TBZ2")
50 SET(CPACK_INSTALL_CMAKE_PROJECTS  ${CMAKE_CURRENT_BINARY_DIR};SimGear;ALL;/)
51
52
53 # split version string into components, note CMAKE_MATCH_0 is the entire regexp match
54 string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)" CPACK_PACKAGE_VERSION ${SIMGEAR_VERSION} )
55 set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1})
56 set(CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2})
57 set(CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_3})
58
59 message(STATUS "version is ${CPACK_PACKAGE_VERSION_MAJOR} dot ${CPACK_PACKAGE_VERSION_MINOR} dot ${CPACK_PACKAGE_VERSION_PATCH}")
60
61 set(CPACK_SOURCE_GENERATOR TBZ2)
62 set(CPACK_SOURCE_PACKAGE_FILE_NAME "simgear-${SIMGEAR_VERSION}" CACHE INTERNAL "tarball basename")
63 set(CPACK_SOURCE_IGNORE_FILES
64   "^${PROJECT_SOURCE_DIR}/.git;\\\\.gitignore;Makefile.am;~$;${CPACK_SOURCE_IGNORE_FILES}")
65
66 message(STATUS "ignoring: ${CPACK_SOURCE_IGNORE_FILES}")
67
68 include (CPack)
69
70 # We have some custom .cmake scripts not in the official distribution.
71 set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
72
73 # Change the default build type to something fast
74 if(NOT CMAKE_BUILD_TYPE)
75   set(CMAKE_BUILD_TYPE Release CACHE STRING
76       "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
77       FORCE)
78 endif(NOT CMAKE_BUILD_TYPE)
79
80 # Determine name of library installation directory, i.e. "lib" vs "lib64", which
81 # differs between all Debian-based vs all other Linux distros.
82 # See cmake bug #11964, http://cmake.org/gitweb?p=cmake.git;a=commit;h=126c993d
83 include(GNUInstallDirs)
84 message(STATUS "Library installation directory: ${CMAKE_INSTALL_LIBDIR}")
85
86 #####################################################################################
87 # Configure library search paths
88 #####################################################################################
89
90 if(NOT "${CMAKE_LIBRARY_ARCHITECTURE}" STREQUAL "")
91     # Workaround for Ubuntu/Debian which introduced the "multiarch" library
92     # directory structure, which is unsupported by CMake < 2.8.10, so we need to
93     # add paths manually
94     # see http://www.cmake.org/Bug/view.php?id=12049 and
95     # http://www.cmake.org/Bug/view.php?id=12037
96     list(APPEND ADDITIONAL_LIBRARY_PATHS
97          /usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
98          /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}
99          /lib/${CMAKE_LIBRARY_ARCHITECTURE})
100     message(STATUS "additional library directories: ${ADDITIONAL_LIBRARY_PATHS}")
101 endif()
102
103 #####################################################################################
104
105 if (NOT MSVC)
106 option(SIMGEAR_SHARED   "Set to ON to build SimGear as a shared library/framework" OFF)
107 option(SYSTEM_EXPAT     "Set to ON to build SimGear using the system libExpat" OFF)
108 else()
109 # Building SimGear DLLs is currently not supported for MSVC.
110 set(SIMGEAR_SHARED OFF)
111 # Using a system expat is currently not supported for MSVC - it would require shared simgear (DLL).
112 set(SYSTEM_EXPAT OFF)
113 endif()
114
115 option(SIMGEAR_HEADLESS "Set to ON to build SimGear without GUI/graphics support" OFF)
116 option(ENABLE_RTI       "Set to ON to build SimGear with RTI support" OFF)
117 option(ENABLE_TESTS     "Set to OFF to disable building SimGear's test applications" ON)
118 option(ENABLE_SOUND     "Set to OFF to disable building SimGear's sound support" ON)
119 option(ENABLE_PKGUTIL   "Set to ON to build the sg_pkgutil application (default)" ON)
120 option(ENABLE_CURL      "Set to ON to use libCurl as the HTTP client backend" OFF)
121 option(ENABLE_DNS       "Set to ON to use udns library and DNS service resolver" OFF)
122
123 if (MSVC)
124   GET_FILENAME_COMPONENT(PARENT_DIR ${PROJECT_BINARY_DIR} PATH)
125   if (CMAKE_CL_64)
126     SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdparty.x64")
127   else (CMAKE_CL_64)
128     SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdparty")
129   endif (CMAKE_CL_64)
130   if (EXISTS ${TEST_3RDPARTY_DIR})
131     set(MSVC_3RDPARTY_ROOT ${PARENT_DIR} CACHE PATH "Location where the third-party dependencies are extracted")
132   else (EXISTS ${TEST_3RDPARTY_DIR})
133     set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
134   endif (EXISTS ${TEST_3RDPARTY_DIR})
135 else (MSVC)
136   set(MSVC_3RDPARTY_ROOT NOT_FOUND CACHE PATH "Location where the third-party dependencies are extracted")
137 endif (MSVC)
138
139 if (MSVC AND MSVC_3RDPARTY_ROOT)
140   message(STATUS "3rdparty files located in ${MSVC_3RDPARTY_ROOT}")
141   set( OSG_MSVC "msvc" )
142   if (${MSVC_VERSION} EQUAL 1700)
143       set( OSG_MSVC ${OSG_MSVC}110 )
144   elseif (${MSVC_VERSION} EQUAL 1600)
145       set( OSG_MSVC ${OSG_MSVC}100 )
146   else (${MSVC_VERSION} EQUAL 1700)
147       set( OSG_MSVC ${OSG_MSVC}90 )
148   endif (${MSVC_VERSION} EQUAL 1700)
149   if (CMAKE_CL_64)
150       set( OSG_MSVC ${OSG_MSVC}-64 )
151       set( MSVC_3RDPARTY_DIR 3rdParty.x64 )
152   else (CMAKE_CL_64)
153       set( MSVC_3RDPARTY_DIR 3rdParty )
154   endif (CMAKE_CL_64)
155
156   set (CMAKE_LIBRARY_PATH ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenScenegraph/lib ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenRTI/lib )
157   set (CMAKE_INCLUDE_PATH ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenScenegraph/include ${MSVC_3RDPARTY_ROOT}/install/${OSG_MSVC}/OpenRTI/include)
158   find_path(BOOST_ROOT boost/version.hpp
159                         ${MSVC_3RDPARTY_ROOT}/boost
160                         ${MSVC_3RDPARTY_ROOT}/boost_1_52_0
161                         ${MSVC_3RDPARTY_ROOT}/boost_1_51_0
162                         ${MSVC_3RDPARTY_ROOT}/boost_1_50_0
163                         ${MSVC_3RDPARTY_ROOT}/boost_1_49_0
164                         ${MSVC_3RDPARTY_ROOT}/boost_1_48_0
165                         ${MSVC_3RDPARTY_ROOT}/boost_1_47_0
166                         ${MSVC_3RDPARTY_ROOT}/boost_1_46_1
167                         ${MSVC_3RDPARTY_ROOT}/boost_1_46_0
168                         ${MSVC_3RDPARTY_ROOT}/boost_1_45_0
169                         ${MSVC_3RDPARTY_ROOT}/boost_1_44_0
170                         )
171   # set (BOOST_ROOT ${MSVC_3RDPARTY_ROOT}/boost_1_44_0)
172   message(STATUS "BOOST_ROOT is ${BOOST_ROOT}")
173   set (OPENAL_INCLUDE_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/include)
174   set (OPENAL_LIBRARY_DIR ${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/lib)
175 endif (MSVC AND MSVC_3RDPARTY_ROOT)
176
177 if(APPLE)
178   find_library(COCOA_LIBRARY Cocoa)
179
180 # this should be handled by setting CMAKE_OSX_DEPLOYMENT_TARGET
181 # but it's not working reliably, so forcing it for now
182   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7")
183   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.7")
184 endif()
185
186 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR
187         ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
188     find_package(Threads REQUIRED)
189 endif()
190
191 # Somehow this only works if included before searching for Boost...
192 include(BoostTestTargets)
193
194 find_package(Boost REQUIRED)
195 set (BOOST_CXX_FLAGS "-DBOOST_BIMAP_DISABLE_SERIALIZATION")
196
197 if(SIMGEAR_HEADLESS)
198     message(STATUS "SimGear mode: HEADLESS")
199     set(ENABLE_SOUND 0)
200 else()
201     message(STATUS "SimGear mode: NORMAL")
202     find_package(OpenGL REQUIRED)
203
204     if (ENABLE_SOUND)
205         find_package(OpenAL REQUIRED)
206         message(STATUS "Sound support: ENABLED")
207     endif(ENABLE_SOUND)
208
209     find_package(OpenSceneGraph 3.2.0 REQUIRED osgText osgSim osgDB osgParticle osgGA osgViewer osgUtil)
210 endif(SIMGEAR_HEADLESS)
211
212 find_package(ZLIB REQUIRED)
213
214 if (ENABLE_CURL)
215   find_package(CURL REQUIRED)
216   message(STATUS "Curl HTTP client: ENABLED")
217 endif()
218
219 if (SYSTEM_EXPAT)
220     message(STATUS "Requested to use system Expat library, forcing SIMGEAR_SHARED to true")
221     set(SIMGEAR_SHARED ON)
222     find_package(EXPAT REQUIRED)
223
224 else()
225     message(STATUS "Using built-in expat code")
226     # XML_STATIC is important to avoid sg_expat_external.h
227     # declaring symbols as declspec(import)
228     add_definitions(-DHAVE_EXPAT_CONFIG_H -DXML_STATIC)
229     set(EXPAT_INCLUDE_DIRS
230             ${PROJECT_SOURCE_DIR}/3rdparty/expat
231             ${PROJECT_BINARY_DIR}/3rdparty/expat)
232 endif(SYSTEM_EXPAT)
233
234 include_directories(${EXPAT_INCLUDE_DIRS})
235
236 check_include_file(inttypes.h HAVE_INTTYPES_H)
237 check_include_file(sys/time.h HAVE_SYS_TIME_H)
238 check_include_file(sys/timeb.h HAVE_SYS_TIMEB_H)
239 check_include_file(unistd.h HAVE_UNISTD_H)
240 check_include_file(windows.h HAVE_WINDOWS_H)
241
242 if(HAVE_INTTYPES_H)
243   # ShivaVG needs inttypes.h
244   add_definitions(-DHAVE_INTTYPES_H)
245 endif()
246
247 if(ENABLE_RTI)
248     # See if we have any rti library variant installed
249     message(STATUS "RTI: ENABLED")
250     find_package(RTI)
251 else()
252     message(STATUS "RTI: DISABLED")
253 endif(ENABLE_RTI)
254
255 check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
256 check_function_exists(ftime HAVE_FTIME)
257 check_function_exists(timegm HAVE_TIMEGM)
258 check_function_exists(rint HAVE_RINT)
259 check_function_exists(mkdtemp HAVE_MKDTEMP)
260 check_function_exists(bcopy HAVE_BCOPY)
261 check_function_exists(mmap HAVE_MMAP)
262
263 if(HAVE_UNISTD_H)
264     set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH})
265     check_cxx_source_compiles(
266        "#include <unistd.h>
267         #if !defined(_POSIX_TIMERS) || (0 >= _POSIX_TIMERS)
268             #error clock_gettime is not supported
269         #endif
270
271         int main() { return 0; }
272         "
273         HAVE_CLOCK_GETTIME)
274 endif(HAVE_UNISTD_H)
275
276 set(RT_LIBRARY "")
277 if(HAVE_CLOCK_GETTIME)
278     check_library_exists(rt clock_gettime "" HAVE_RT)
279     if(HAVE_RT)
280         set(RT_LIBRARY rt)
281     endif(HAVE_RT)
282 endif(HAVE_CLOCK_GETTIME)
283
284 set(DL_LIBRARY "")
285 check_cxx_source_compiles(
286     "#include <dlfcn.h>
287     int main(void) {
288         return 0;
289     }
290     "
291     HAVE_DLFCN_H)
292
293 if(HAVE_DLFCN_H)
294     check_library_exists(dl dlerror "" HAVE_DL)
295     if(HAVE_DL)
296         set(DL_LIBRARY "dl")
297     endif()
298 endif()
299
300 SET(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually 'd' on windows")
301 SET(CMAKE_RELEASE_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows")
302 SET(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows")
303 SET(CMAKE_MINSIZEREL_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows")
304
305 # isnan might not be real symbol, so can't check using function_exists
306 check_cxx_source_compiles(
307     "#include <cmath>
308     int main() { return isnan(0.0);} "
309     HAVE_ISNAN)
310
311 check_cxx_source_compiles(
312     "#include <cmath>
313     int main() { return std::isnan(0.0);} "
314     HAVE_STD_ISNAN)
315
316 if(CMAKE_COMPILER_IS_GNUCXX)
317     set(WARNING_FLAGS_CXX "-Wall")
318     set(WARNING_FLAGS_C   "-Wall")
319
320     # certain GCC versions don't provide the atomic builds, and hence
321     # require is to provide them in SGAtomic.cxx
322     set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH})
323     check_cxx_source_compiles(
324        "int main() { unsigned mValue; return __sync_add_and_fetch(&mValue, 1); }"
325         GCC_ATOMIC_BUILTINS_FOUND)
326 endif(CMAKE_COMPILER_IS_GNUCXX)
327
328 if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
329     # Boost redeclares class members
330     set(WARNING_FLAGS_CXX "-Wall -Wno-overloaded-virtual -Wno-redeclared-class-member")
331     set(WARNING_FLAGS_C   "-Wall")
332     set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
333     set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
334     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
335 endif()
336
337 if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
338 # boost goes haywire wrt static asserts
339     check_cxx_compiler_flag(-Wno-unused-local-typedefs HAS_NOWARN_UNUSED_TYPEDEFS)
340     if(HAS_NOWARN_UNUSED_TYPEDEFS)
341         set(WARNING_FLAGS_CXX " ${WARNING_FLAGS_CXX} -Wno-unused-local-typedefs")
342     endif()
343 endif()
344
345 if(WIN32)
346
347     if(MINGW)
348         add_definitions(-D_WIN32_WINNT=0x501)
349     endif()
350
351     if(MSVC)
352         # turn off various warnings
353         # foreach(warning 4244 4251 4267 4275 4290 4786 4305 4996)
354         #     SET(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}")
355         # endforeach(warning)
356
357         set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /wd4996 /wd4250 -Dstrdup=_strdup")
358         if (${MSVC_VERSION} GREATER 1599)
359             set( MSVC_LD_FLAGS "/FORCE:MULTIPLE" )
360         endif (${MSVC_VERSION} GREATER 1599)
361     endif(MSVC)
362
363     # assumed on Windows
364     set(HAVE_GETLOCALTIME 1)
365
366     set( WINSOCK_LIBRARY "ws2_32.lib" )
367     set( RT_LIBRARY "winmm" )
368 endif(WIN32)
369
370 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS_C} ${MSVC_FLAGS}")
371 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS_CXX} ${MSVC_FLAGS} ${BOOST_CXX_FLAGS}")
372 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MSVC_LD_FLAGS}")
373
374 # use BEFORE to ensure local directories are used first,
375 # ahead of system-installed libs
376 include_directories(BEFORE ${PROJECT_SOURCE_DIR})
377 include_directories(BEFORE ${PROJECT_SOURCE_DIR}/simgear/canvas/ShivaVG/include)
378 include_directories(BEFORE ${PROJECT_BINARY_DIR}/simgear)
379
380 include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
381     ${Boost_INCLUDE_DIRS}
382     ${ZLIB_INCLUDE_DIR}
383     ${OPENAL_INCLUDE_DIR}
384     ${CURL_INCLUDE_DIRS}
385 )
386
387 add_definitions(-DHAVE_CONFIG_H)
388
389 # configure a header file to pass some of the CMake settings
390 # to the source code
391 configure_file (
392   "${PROJECT_SOURCE_DIR}/simgear/simgear_config_cmake.h.in"
393   "${PROJECT_BINARY_DIR}/simgear/simgear_config.h"
394   )
395
396 if(ENABLE_TESTS)
397     # enable CTest / make test target
398     message(STATUS "Tests: ENABLED")
399
400     include (Dart)
401     enable_testing()
402 else()
403     message(STATUS "Tests: DISABLED")
404 endif(ENABLE_TESTS)
405
406 # always set TEST_LIBS as it is also used by other tools/applications
407 set(TEST_LIBS_INTERNAL_CORE
408     ${CMAKE_THREAD_LIBS_INIT}
409     ${ZLIB_LIBRARY}
410     ${WINSOCK_LIBRARY}
411     ${RT_LIBRARY}
412     ${DL_LIBRARY}
413     ${COCOA_LIBRARY}
414     ${CURL_LIBRARIES})
415 set(TEST_LIBS SimGearCore ${TEST_LIBS_INTERNAL_CORE})
416
417 if(NOT SIMGEAR_HEADLESS)
418     set(TEST_LIBS SimGearScene ${OPENGL_LIBRARIES} ${TEST_LIBS})
419 endif()
420
421 install (FILES ${PROJECT_BINARY_DIR}/simgear/simgear_config.h  DESTINATION include/simgear/)
422
423 include_directories(3rdparty/utf8/source)
424 if (ENABLE_DNS)
425     message(STATUS "DNS resolver: ENABLED")
426     include_directories(3rdparty/udns)
427 else()
428     message(STATUS "DNS resolver: DISABLED")
429 endif()
430
431
432 add_subdirectory(3rdparty)
433 add_subdirectory(simgear)
434
435 #-----------------------------------------------------------------------------
436 ### Export stuff, see https://cmake.org/cmake/help/v3.2/manual/cmake-packages.7.html#creating-packages
437 #-----------------------------------------------------------------------------
438
439 generate_export_header(SimGearCore)
440 if(NOT SIMGEAR_HEADLESS)
441   generate_export_header(SimGearScene)
442 endif()
443
444 include(CMakePackageConfigHelpers)
445
446 write_basic_package_version_file(
447   "${CMAKE_CURRENT_BINARY_DIR}/SimGear/SimGearConfigVersion.cmake"
448   VERSION ${SIMGEAR_VERSION}
449   COMPATIBILITY AnyNewerVersion
450 )
451
452 configure_file(SimGearConfig.cmake.in
453   "${CMAKE_CURRENT_BINARY_DIR}/SimGear/SimGearConfig.cmake"
454   @ONLY
455 )
456
457 set(ConfigPackageLocation lib/cmake/SimGear)
458 install(EXPORT SimGearTargets
459   DESTINATION ${ConfigPackageLocation}
460 )
461 install(
462   FILES
463     "${CMAKE_CURRENT_BINARY_DIR}/SimGear/SimGearConfig.cmake"
464     "${CMAKE_CURRENT_BINARY_DIR}/SimGear/SimGearConfigVersion.cmake"
465   DESTINATION ${ConfigPackageLocation}
466   COMPONENT Devel
467 )
468
469 #-----------------------------------------------------------------------------
470 ### uninstall target
471 #-----------------------------------------------------------------------------
472 CONFIGURE_FILE(
473   "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/cmake_uninstall.cmake.in"
474   "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
475   IMMEDIATE @ONLY)
476 ADD_CUSTOM_TARGET(uninstall
477   "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")