File: CMakeLists.txt

package info (click to toggle)
garmindev 0.3.4%2Bsvn3432-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 704 kB
  • ctags: 985
  • sloc: cpp: 8,631; makefile: 4
file content (78 lines) | stat: -rw-r--r-- 2,327 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
project(GarminDev)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/qlandkartegt)

cmake_minimum_required(VERSION 2.6)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

#this one is for the API version check
set(VER_MAJOR     01)
set(VER_MINOR     18)

#this one is for the release version
set(PACKAGE_VER_MAJOR     0)
set(PACKAGE_VER_MINOR     3)
set(PACKAGE_VER_PATCH     5)


add_definitions(-DVER_MAJOR=${VER_MAJOR} -DVER_MINOR=${VER_MINOR})

# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH
  ${CMAKE_SOURCE_DIR}/cmake/Modules
)

# add definitions
include(DefineCMakeDefaults)
include(DefineCompilerFlags)
include(DefineInstallationPaths)
include(DefineOptions.cmake)
include(CPackConfig.cmake)

# disallow in-source build
# include(MacroEnsureOutOfSourceBuild)
# macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.")

# config.h generation
include(ConfigureChecks.cmake)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_CURRENT_BINARY_DIR}
)

if(APPLE)
  set(SHARED_LIB_EXT ".dylib")
  set(QLANDKARTEGT_BUILD_DIR "../build_QLandkarteGT"
      CACHE PATH "location of the QLandkarteGT build folder")
  add_custom_target(mac-deploy
    COMMAND
      rm -rf "${QLANDKARTEGT_BUILD_DIR}/bin/QLandkarte\ GT.app/Contents/Resources/Drivers" &&
      mkdir -p "${QLANDKARTEGT_BUILD_DIR}/bin/QLandkarte\ GT.app/Contents/Resources/Drivers" &&
      tar -cpf - --exclude '*.a' -C ${LIBRARY_OUTPUT_PATH} . |
      tar -xpf - -C "${QLANDKARTEGT_BUILD_DIR}/bin/QLandkarte\ GT.app/Contents/Resources/Drivers"
  )
elseif(UNIX)
  set(SHARED_LIB_EXT ".so")
endif (APPLE)

find_package(USB REQUIRED)

add_subdirectory(./src)
add_subdirectory(./src/GPSMap60CSx)
add_subdirectory(./src/GPSMap76)
add_subdirectory(./src/EtrexLegendC)
add_subdirectory(./src/EtrexLegend)
add_subdirectory(./src/EtrexH)
add_subdirectory(./src/whatGarmin)
add_subdirectory(./src/ForeRunner)
add_subdirectory(./src/Oregon)

install(
    DIRECTORY
        ${LIBRARY_OUTPUT_PATH}
    DESTINATION
        ${LIB_INSTALL_DIR}
)