1 #################################################################################
4 # GEOS unit tests build configuration for CMake build system
6 # Copyright (C) 2009 Mateusz Loskot <mateusz@loskot.net>
8 # This is free software; you can redistribute and/or modify it under
9 # the terms of the GNU Lesser General Public Licence as published
10 # by the Free Software Foundation.
11 # See the COPYING file for more information.
13 #################################################################################
15 set(STATUS_MESSAGE "Enable GEOS Unit Tests build")
16 set(STATUS_RESULT "OFF")
19 include_directories(${CMAKE_SOURCE_DIR}/capi)
20 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/tut)
21 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
23 file(GLOB_RECURSE geos_unit_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
25 add_executable(geos_unit ${geos_unit_SOURCES})
26 if(APPLE AND GEOS_ENABLE_MACOSX_FRAMEWORK)
27 target_link_libraries(geos_unit GEOS)
29 target_link_libraries(geos_unit geos geos_c)
32 add_test(geos_unit ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/geos_unit)
34 set(STATUS_RESULT "ON")
37 message(STATUS "${STATUS_MESSAGE} - ${STATUS_RESULT}")