forked from mapsme/omim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (41 loc) · 1.25 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.2)
project(omim C CXX)
add_compile_options(
"-Wall"
"-pedantic"
"-std=c++11"
)
find_package(Threads)
get_filename_component(PROJECT_SOURCE_DIR . ABSOLUTE)
include_directories(${CMAKE_HOME_DIRECTORY})
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
add_definitions(-DDEBUG)
endif()
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE "Release")
endif()
if ("${NO_TESTS}" STREQUAL "")
set(NO_TESTS FALSE)
endif()
function(omim_add_library library)
add_library(${library} ${ARGN})
endfunction()
function(omim_add_executable executable)
add_executable(${executable} ${ARGN})
endfunction()
function(omim_add_test executable)
if (NOT ${NO_TESTS})
omim_add_executable(${executable} ${PROJECT_SOURCE_DIR}/testing/testingmain.cpp ${ARGN})
endif()
endfunction()
function(omim_link_libraries target)
if (TARGET ${target})
target_link_libraries(${target} ${ARGN} ${CMAKE_THREAD_LIBS_INIT})
else()
message("~> Skipping linking the libraries to the target ${target} as it does not exist")
endif()
endfunction()
add_subdirectory(base)
add_subdirectory(geometry)