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

Last change on this file since 14173 was 14173, checked in by guenther, 11 years ago
  • added tool to create sqlite poi database from osm xml
  • Property svn:eol-style set to native
File size: 1.7 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_definitions (
51  -DPACKAGE=${APPLICATION_NAME}
52  -DPACKAGE_VERSION=${APPLICATION_VERSION}
53)
54
55add_executable(osm2poidb osm2poidb.c)
56
57target_link_libraries(osm2poidb
58  ${GTK2_LIBRARIES}
59  ${SQLITE3_LIBRARIES}
60  ${XML2_LIBRARIES}
61)
62
63
64install(
65  TARGETS
66    osm2poidb
67  DESTINATION
68    ${BIN_INSTALL_DIR}
69)
70
Note: See TracBrowser for help on using the repository browser.