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 #################################################################################
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)
24 set(installdest include/geos)
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}
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)
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\")")
51 "execute_process(COMMAND ln -sfh Versions/Current/Headers \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/GEOS.framework/Headers\")")
54 #################################################################################
55 # Group source files for IDE source explorers (e.g. Visual Studio)
56 #################################################################################
57 GenerateSourceGroups(include)