source: subversion/applications/utils/export/osm2poidb/CMakeLists.txt @ 16380

Last change on this file since 16380 was 14178, checked in by guenther, 11 years ago
  • small bugfix for osm2poidb
  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1project(osm2poidb)
2
3# global needed variables
4set(APPLICATION_NAME "osm2poidb")
5set(APPLICATION_VERSION "0.2")
6
7# required cmake version
8cmake_minimum_required(VERSION 2.4.3)
9set(CMAKE_COLOR_MAKEFILE ON)
10set(CMAKE_VERBOSE_MAKEFILE OFF)
11
12# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
13set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
14
15# make some more macros available
16include(MacroEnsureOutOfSourceBuild)
17include(MacroGetSubversionRevision)
18macro_get_subversion_revision(SVN_REVISION)
19
20# disallow in-source build
21macro_ensure_out_of_source_build("${APPLICATION_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/osm2poidb [options]' there.")
22
23# macro_optional_find_package() is the same as FIND_PACKAGE(<name>) but additionally creates an OPTION(WITH_<name>)
24# so the checking for the software can be disabled via ccmake or -DWITH_<name>=OFF
25#MACRO_OPTIONAL_FIND_PACKAGE(DBUS)
26
27include(DefineInstallationPaths)
28
29find_package(GTK2 REQUIRED)
30find_package(XML2 REQUIRED)
31find_package(SQLite3 REQUIRED)
32
33set(GPSDRIVE_PUBLIC_INCLUDE_DIRS
34  ${CMAKE_CURRENT_SOURCE_DIR}
35  ${CMAKE_BINARY_DIR}
36  CACHE INTERNAL "gpsdrive public include directories"
37)
38
39set(GPSDRIVE_PRIVATE_INCLUDE_DIRS
40  ${GTK2_INCLUDE_DIRS}
41  ${XML2_INCLUDE_DIRS}
42  ${SQLITE3_INCLUDE_DIRS}
43)
44
45include_directories(
46  ${GPSDRIVE_PUBLIC_INCLUDE_DIRS}
47  ${GPSDRIVE_PRIVATE_INCLUDE_DIRS}
48)
49
50add_executable(osm2poidb osm2poidb.c)
51
52target_link_libraries(osm2poidb
53  ${GTK2_LIBRARIES}
54  ${SQLITE3_LIBRARIES}
55  ${XML2_LIBRARIES}
56)
57
58
59install(
60  TARGETS
61    osm2poidb
62  DESTINATION
63    ${BIN_INSTALL_DIR}
64)
65
Note: See TracBrowser for help on using the repository browser.