source: subversion/applications/utils/import/srtm2wayinfo/CMakeLists.txt

Last change on this file was 16899, checked in by herm, 8 years ago

Improved documentation.

File size: 1.9 KB
Line 
1# Copyright (c) 2009 Hermann Kraus
2# This software is available under a "MIT Style" license
3# (see COPYING).
4
5
6project(SRTM2WAYINFO)
7cmake_minimum_required (VERSION 2.6)
8SET(WANT_DEBUG 1)
9SET(CMAKE_VERBOSE_MAKEFILE OFF)
10
11SET(SRTM2WAYINFO_SOURCES
12    main.cpp
13    osm-parse.cpp
14    relations.cpp
15    srtm.cpp
16    zip.cpp
17    settings.cpp
18    osmtypes.cpp
19)
20
21SET(EXE_NAME "srtm2wayinfo")
22SET(VERSION 0.9)
23
24#################################################################################
25
26SET(CMAKE_COLOR_MAKEFILE ON)
27set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
28MESSAGE(STATUS "SRTM2Wayinfo ${VERSION} will be built to install into ${CMAKE_INSTALL_PREFIX}")
29
30IF(WANT_DEBUG)
31  SET(CMAKE_BUILD_TYPE Debug)
32ENDIF(WANT_DEBUG)
33IF (WANT_RELEASEWITHDEBUG)
34  SET(CMAKE_BUILD_TYPE RelWithDebInfo)
35ENDIF (WANT_RELEASEWITHDEBUG)
36IF(NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG)
37  SET(CMAKE_BUILD_TYPE RELEASE)
38ENDIF(NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG)
39
40# Dependencies
41SET (QT_MT_REQUIRED TRUE)
42SET (QT_MIN_VERSION "4.0.0")
43FIND_PACKAGE(Qt4 REQUIRED)
44INCLUDE( ${QT_USE_FILE} )
45IF (QT_FOUND)
46    ADD_DEFINITIONS(
47    ${QT_DEFINITIONS}
48    -DQT_CORE_LIB
49    -DQT_GUI_LIB
50    -DQT_THREAD_LIB
51    -DQT_XML_LIB
52  )
53ELSE(QT_FOUND)
54  MESSAGE(FATAL_ERROR "No Qt4 found")
55ENDIF(QT_FOUND)
56
57FIND_PACKAGE(ZLIB REQUIRED)
58if (NOT ZLIB_FOUND)
59    MESSAGE(FATAL_ERROR "zlib not found")
60ENDIF()
61
62FIND_PACKAGE(CURL REQUIRED)
63if (NOT CURL_FOUND)
64    MESSAGE(FATAL_ERROR "libcurl not found")
65ENDIF()
66
67FIND_PACKAGE(ZZIPLIB REQUIRED)
68if (NOT ZZIPLIB_FOUND)
69    MESSAGE(FATAL_ERROR "zziplib not found")
70ENDIF()
71
72include_directories(
73    ${CMAKE_SOURCE_DIR}
74    ${QT_INCLUDES}
75    ${CURL_INCLUDE_DIR}
76    ${ZLIB_INCLUDE_DIR}
77    ${ZZIPLIB_INCLUDE_DIR}
78)
79
80
81ADD_EXECUTABLE(${EXE_NAME}
82 ${SRTM2WAYINFO_SOURCES}
83)
84
85TARGET_LINK_LIBRARIES(${EXE_NAME}
86    ${QT_LIBRARIES}
87    ${CURL_LIBRARIES}
88    ${ZLIB_LIBRARIES}
89    ${ZZIPLIB_LIBRARIES}
90)
Note: See TracBrowser for help on using the repository browser.