Enable GEOSisClosed test
[geos.git] / tools / CMakeLists.txt
blobee5b2d4ac462e4f291add13e1ba966d0d4cfd86a
1 #################################################################################
3 # GEOS tools (geos-config) 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 if(UNIX)
16   if(APPLE AND GEOS_ENABLE_MACOSX_FRAMEWORK AND GEOS_ENABLE_MACOSX_FRAMEWORK_UNIXCOMPAT)
17     set(installdest GEOS.framework/Versions/${VERSION_MAJOR}/unix/bin)
18     set(prefix ${CMAKE_INSTALL_PREFIX}/GEOS.framework/Versions/${VERSION_MAJOR}/unix)
19   elseif(APPLE AND GEOS_ENABLE_MACOSX_FRAMEWORK)
20     # just a dummy so installdest not set
21     # want geos-config only for Mac unix build or framework+unixcompat
22   else()
23     set(installdest bin)
24     set(prefix ${CMAKE_INSTALL_PREFIX})
25   endif()
27   set(exec_prefix ${prefix}/bin)
28   set(libdir ${prefix}/lib)
29   
30   if(installdest)
31     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/geos-config.in
32                    ${CMAKE_CURRENT_BINARY_DIR}/geos-config @ONLY)
33   
34     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos-config
35       DESTINATION ${installdest}
36       PERMISSIONS
37       OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
38 endif()
40 endif()