Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CMakeLists.txt « pytraffic « traffic - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 95aa28894d3839f32342fde636ab0c49c52335ee (plain)
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
project(pytraffic)

check_pybindings()

set(
  SRC
  bindings.cpp
)

# Suppress boost-python warnings
add_compile_options(
  "-Wno-unused-local-typedef"
)

set(Boost_USE_MULTITHREADED ON)

# For macOS we can use static linking, on Linux we can't.
if (PLATFORM_MAC)
  set(Boost_USE_STATIC_LIBS ON)
  set(Boost_USE_STATIC_RUNTIME ON)
endif()

find_package(PythonLibs 2.7 REQUIRED)
find_package(Boost 1.54 REQUIRED COMPONENTS python)
include_directories(${PYTHON_INCLUDE_DIRS})

add_library(${PROJECT_NAME} MODULE ${SRC})

if (PLATFORM_MAC)
  omim_link_libraries(
    ${PROJECT_NAME}
    ${Qt5Widgets_LIBRARIES}
    "-framework Cocoa"
    "-framework IOKit"
    "-framework QuartzCore"
    "-framework SystemConfiguration"
  )
endif()

if (PLATFORM_WIN OR PLATFORM_LINUX)
  omim_link_libraries(
    ${PROJECT_NAME}
    ${Qt5Widgets_LIBRARIES}
  )
endif()

omim_link_libraries(${PROJECT_NAME} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES} traffic platform geometry base)
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")