Include interrupt header, dummy
[geos.git] / include / CMakeLists.txt
blob159ea4c9b448211dc41d2a28e265a7ad386a0f6c
1 #################################################################################
3 # GEOS C++ library build configuration for CMake build system
5 # Copyright (C) 2009 Mateusz Loskot <mateusz@loskot.net>
7 # This is free software; you can redistribute and/or modify it under
8 # the terms of the GNU Lesser General Public Licence as published
9 # by the Free Software Foundation. 
10 # See the COPYING file for more information.
12 #################################################################################
14 #################################################################################
15 # Install/Uninstall
16 #################################################################################
18 # There is a builtin cmake way to get headers in the right location
19 # for OS X framework, but it's not practical this complex tree
21 if(APPLE AND GEOS_ENABLE_MACOSX_FRAMEWORK)
22   set(installdest GEOS.framework/Versions/${VERSION_MAJOR}/Headers)
23 else()
24   set(installdest include/geos)
25 endif()
28 install(FILES geos.h
29   DESTINATION ${installdest})
31 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos/platform.h
32   DESTINATION ${installdest})
34 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos/version.h
35   DESTINATION ${installdest})
37 install(DIRECTORY geos/
38   DESTINATION ${installdest}
39   FILES_MATCHING
40   PATTERN "*.h"
41   PATTERN "*.inl"
42   PATTERN ".svn" EXCLUDE)
44 # Some post-processing for the framework
45 # luckily GEOS uses header subdir already, just need to change case
46 if(APPLE AND GEOS_ENABLE_MACOSX_FRAMEWORK)
47   install(CODE 
48     "execute_process(COMMAND find \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${installdest}\" -name *.* -print0 
49     COMMAND xargs -0 sed -E -i \"\" \"s,# *include[[:space:]]+<geos/,#include <GEOS/,g\")")
50   install(CODE 
51     "execute_process(COMMAND ln -sfh Versions/Current/Headers \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/GEOS.framework/Headers\")")
52 endif()
54 #################################################################################
55 # Group source files for IDE source explorers (e.g. Visual Studio)
56 #################################################################################
57 GenerateSourceGroups(include)