From d9b6547fa2967aaa5bebcae00346b3f305c094b5 Mon Sep 17 00:00:00 2001 From: Yuri Gorshenin Date: Wed, 21 Dec 2016 12:40:22 +0300 Subject: [PATCH] [cmake] Added CMakeLists for generator_tests_support and libtess2. --- 3party/libtess2/CMakeLists.txt | 24 +++++++++++++++++++ CMakeLists.txt | 11 +++++++++ generator/CMakeLists.txt | 1 + .../generator_tests_support/CMakeLists.txt | 13 ++++++++++ indexer/CMakeLists.txt | 1 + indexer/indexer_tests_support/CMakeLists.txt | 9 +++++++ 6 files changed, 59 insertions(+) create mode 100644 3party/libtess2/CMakeLists.txt create mode 100644 generator/CMakeLists.txt create mode 100644 generator/generator_tests_support/CMakeLists.txt create mode 100644 indexer/indexer_tests_support/CMakeLists.txt diff --git a/3party/libtess2/CMakeLists.txt b/3party/libtess2/CMakeLists.txt new file mode 100644 index 0000000000..0670ccebc8 --- /dev/null +++ b/3party/libtess2/CMakeLists.txt @@ -0,0 +1,24 @@ +project(tess2) + +include_directories(Include) + +set( + SRC + Include/tesselator.h + Source/bucketalloc.c + Source/bucketalloc.h + Source/dict.c + Source/dict.h + Source/geom.c + Source/geom.h + Source/mesh.c + Source/mesh.h + Source/priorityq.c + Source/priorityq.h + Source/sweep.c + Source/sweep.h + Source/tess.c + Source/tess.h +) + +add_library(${PROJECT_NAME} ${SRC}) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7734b203dd..e23f617301 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,12 @@ endif() omim_set_platform_var(PLATFORM_LINUX "linux-.*" ${LINUX_DETECTED}) +if (PLATFORM_LINUX OR PLATFORM_MAC OR PLATFORM_WIN) + set(PLATFORM_DESKTOP TRUE) +else() + set(PLATFORM_DESKTOP FALSE) +endif() + # End of setting the target platform # Find installed packages @@ -153,6 +159,7 @@ add_subdirectory(3party/minizip) add_subdirectory(3party/freetype) add_subdirectory(3party/fribidi) add_subdirectory(3party/expat) +add_subdirectory(3party/libtess2) add_subdirectory(map) add_subdirectory(drape) @@ -182,6 +189,10 @@ add_subdirectory(tracking) add_subdirectory(traffic) add_subdirectory(partners_api) +if (PLATFORM_DESKTOP) + add_subdirectory(generator) +endif() + omim_add_test_subdirectory(qt_tstfrm) omim_add_test_subdirectory(3party/gmock) diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt new file mode 100644 index 0000000000..8b20acffb2 --- /dev/null +++ b/generator/CMakeLists.txt @@ -0,0 +1 @@ +omim_add_test_subdirectory(generator_tests_support) diff --git a/generator/generator_tests_support/CMakeLists.txt b/generator/generator_tests_support/CMakeLists.txt new file mode 100644 index 0000000000..0dddb725cf --- /dev/null +++ b/generator/generator_tests_support/CMakeLists.txt @@ -0,0 +1,13 @@ +project(generator_tests_support) + +set( + SRC + restriction_helpers.cpp + restriction_helpers.hpp + test_feature.cpp + test_feature.hpp + test_mwm_builder.cpp + test_mwm_builder.hpp +) + +add_library(${PROJECT_NAME} ${SRC}) diff --git a/indexer/CMakeLists.txt b/indexer/CMakeLists.txt index 3ae176faf9..0abc38bcfb 100644 --- a/indexer/CMakeLists.txt +++ b/indexer/CMakeLists.txt @@ -140,4 +140,5 @@ file(COPY ${OTHER_FILES} DESTINATION ${CMAKE_BINARY_DIR}) add_library(${PROJECT_NAME} ${SRC}) +omim_add_test_subdirectory(indexer_tests_support) #omim_add_test_subdirectory(indexer_tests) diff --git a/indexer/indexer_tests_support/CMakeLists.txt b/indexer/indexer_tests_support/CMakeLists.txt new file mode 100644 index 0000000000..753ccca7f6 --- /dev/null +++ b/indexer/indexer_tests_support/CMakeLists.txt @@ -0,0 +1,9 @@ +project(indexer_tests_support) + +set( + SRC + helpers.cpp + helpers.hpp +) + +add_library(${PROJECT_NAME} ${SRC})