forked from organicmaps/organicmaps
Merge pull request #4709 from therearesomewhocallmetim/cmake_drape
Cmake drape
This commit is contained in:
commit
42c4a8e6be
16 changed files with 928 additions and 496 deletions
124
3party/expat/CMakeLists.txt
Executable file → Normal file
124
3party/expat/CMakeLists.txt
Executable file → Normal file
|
@ -1,111 +1,25 @@
|
|||
# This file is copyrighted under the BSD-license for buildsystem files of KDE
|
||||
# copyright 2010, Patrick Spendrin <ps_ml@gmx.de>
|
||||
|
||||
project(expat)
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
set(PACKAGE_BUGREPORT "expat-bugs@libexpat.org")
|
||||
set(PACKAGE_NAME "expat")
|
||||
set(PACKAGE_VERSION "2.1.0")
|
||||
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
|
||||
set(PACKAGE_TARNAME "${PACKAGE_NAME}")
|
||||
add_definitions(-DHAVE_MEMMOVE)
|
||||
|
||||
option(BUILD_tools "build the xmlwf tool for expat library" ON)
|
||||
option(BUILD_examples "build the examples for expat library" ON)
|
||||
option(BUILD_tests "build the tests for expat library" ON)
|
||||
option(BUILD_shared "build a shared expat library" ON)
|
||||
|
||||
# configuration options
|
||||
set(XML_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point")
|
||||
option(XML_DTD "Define to make parameter entity parsing functionality available" ON)
|
||||
option(XML_NS "Define to make XML Namespaces functionality available" ON)
|
||||
|
||||
if(XML_DTD)
|
||||
set(XML_DTD 1)
|
||||
else(XML_DTD)
|
||||
set(XML_DTD 0)
|
||||
endif(XML_DTD)
|
||||
if(XML_NS)
|
||||
set(XML_NS 1)
|
||||
else(XML_NS)
|
||||
set(XML_NS 0)
|
||||
endif(XML_NS)
|
||||
|
||||
if(BUILD_tests)
|
||||
enable_testing()
|
||||
endif(BUILD_tests)
|
||||
|
||||
include(ConfigureChecks.cmake)
|
||||
|
||||
include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib)
|
||||
if(MSVC)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
|
||||
endif(MSVC)
|
||||
|
||||
set(expat_SRCS
|
||||
lib/xmlparse.c
|
||||
lib/xmlrole.c
|
||||
lib/xmltok.c
|
||||
lib/xmltok_impl.c
|
||||
lib/xmltok_ns.c
|
||||
add_compile_options(
|
||||
"-Wall"
|
||||
)
|
||||
|
||||
if(WIN32 AND BUILD_shared)
|
||||
set(expat_SRCS ${expat_SRCS} lib/libexpat.def)
|
||||
endif(WIN32 AND BUILD_shared)
|
||||
set(
|
||||
SRC
|
||||
lib/ascii.h
|
||||
lib/expat_external.h
|
||||
lib/expat.h
|
||||
lib/internal.h
|
||||
lib/nametab.h
|
||||
lib/xmlparse.c
|
||||
lib/xmlrole.c
|
||||
lib/xmlrole.h
|
||||
lib/xmltok_impl.c
|
||||
lib/xmltok_ns.c
|
||||
lib/xmltok.c
|
||||
lib/xmltok.h
|
||||
)
|
||||
|
||||
if(BUILD_shared)
|
||||
set(_SHARED SHARED)
|
||||
else(BUILD_shared)
|
||||
set(_SHARED STATIC)
|
||||
endif(BUILD_shared)
|
||||
|
||||
add_library(expat ${_SHARED} ${expat_SRCS})
|
||||
|
||||
install(TARGETS expat RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix "\${prefix}/bin")
|
||||
set(libdir "\${prefix}/lib")
|
||||
set(includedir "\${prefix}/include")
|
||||
configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc)
|
||||
|
||||
install(FILES lib/expat.h lib/expat_external.h DESTINATION include)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION lib/pkgconfig)
|
||||
|
||||
|
||||
|
||||
if(BUILD_tools AND NOT WINCE)
|
||||
set(xmlwf_SRCS
|
||||
xmlwf/xmlwf.c
|
||||
xmlwf/xmlfile.c
|
||||
xmlwf/codepage.c
|
||||
xmlwf/readfilemap.c
|
||||
)
|
||||
|
||||
add_executable(xmlwf ${xmlwf_SRCS})
|
||||
target_link_libraries(xmlwf expat)
|
||||
install(TARGETS xmlwf DESTINATION bin)
|
||||
install(FILES doc/xmlwf.1 DESTINATION share/man/man1)
|
||||
endif(BUILD_tools AND NOT WINCE)
|
||||
|
||||
if(BUILD_examples)
|
||||
add_executable(elements examples/elements.c)
|
||||
target_link_libraries(elements expat)
|
||||
|
||||
add_executable(outline examples/outline.c)
|
||||
target_link_libraries(outline expat)
|
||||
endif(BUILD_examples)
|
||||
|
||||
if(BUILD_tests)
|
||||
## these are unittests that can be run on any platform
|
||||
add_executable(runtests tests/runtests.c tests/chardata.c tests/minicheck.c)
|
||||
target_link_libraries(runtests expat)
|
||||
add_test(runtests runtests)
|
||||
|
||||
add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/minicheck.c)
|
||||
target_link_libraries(runtestspp expat)
|
||||
add_test(runtestspp runtestspp)
|
||||
endif(BUILD_tests)
|
||||
add_library(${PROJECT_NAME} ${SRC})
|
||||
|
|
|
@ -1,404 +1,121 @@
|
|||
# CMakeLists.txt
|
||||
#
|
||||
# Copyright 2013-2015 by
|
||||
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
#
|
||||
# Written originally by John Cary <cary@txcorp.com>
|
||||
#
|
||||
# This file is part of the FreeType project, and may only be used, modified,
|
||||
# and distributed under the terms of the FreeType project license,
|
||||
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
|
||||
# indicate that you have read the license and understand and accept it
|
||||
# fully.
|
||||
#
|
||||
#
|
||||
# As a preliminary, create a compilation directory and change into it, for
|
||||
# example
|
||||
#
|
||||
# mkdir ~/freetype2.compiled
|
||||
# cd ~/freetype2.compiled
|
||||
#
|
||||
# Now you can say
|
||||
#
|
||||
# cmake <path-to-freetype2-src-dir>
|
||||
#
|
||||
# to create a Makefile that builds a static version of the library.
|
||||
#
|
||||
# For a dynamic library, use
|
||||
#
|
||||
# cmake <path-to-freetype2-src-dir> -D BUILD_SHARED_LIBS:BOOL=true
|
||||
#
|
||||
# For a framework on OS X, use
|
||||
#
|
||||
# cmake <path-to-freetype2-src-dir> -D BUILD_FRAMEWORK:BOOL=true -G Xcode
|
||||
#
|
||||
# instead.
|
||||
#
|
||||
# For an iOS static library, use
|
||||
#
|
||||
# cmake <path-to-freetype2-src-dir> -D IOS_PLATFORM=OS -G Xcode
|
||||
#
|
||||
# or
|
||||
#
|
||||
# cmake <path-to-freetype2-src-dir> -D IOS_PLATFORM=SIMULATOR -G Xcode
|
||||
#
|
||||
# Please refer to the cmake manual for further options, in particular, how
|
||||
# to modify compilation and linking parameters.
|
||||
#
|
||||
# Some notes.
|
||||
#
|
||||
# . `cmake' creates configuration files in
|
||||
#
|
||||
# <build-directory>/include/freetype/config
|
||||
#
|
||||
# which should be further modified if necessary.
|
||||
#
|
||||
# . You can use `cmake' directly on a freshly cloned FreeType git
|
||||
# repository.
|
||||
#
|
||||
# . `CMakeLists.txt' is provided as-is since it is normally not used by the
|
||||
# developer team.
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
|
||||
include(CheckIncludeFile)
|
||||
|
||||
|
||||
# CMAKE_TOOLCHAIN_FILE must be set before `project' is called, which
|
||||
# configures the base build environment and references the toolchain file
|
||||
if (APPLE)
|
||||
if (DEFINED IOS_PLATFORM)
|
||||
if (NOT "${IOS_PLATFORM}" STREQUAL "OS"
|
||||
AND NOT "${IOS_PLATFORM}" STREQUAL "SIMULATOR")
|
||||
message(FATAL_ERROR
|
||||
"IOS_PLATFORM must be set to either OS or SIMULATOR")
|
||||
endif ()
|
||||
if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
|
||||
message(AUTHOR_WARNING
|
||||
"You should use Xcode generator with IOS_PLATFORM enabled to get Universal builds.")
|
||||
endif ()
|
||||
if (BUILD_SHARED_LIBS)
|
||||
message(FATAL_ERROR
|
||||
"BUILD_SHARED_LIBS can not be on with IOS_PLATFORM enabled")
|
||||
endif ()
|
||||
if (BUILD_FRAMEWORK)
|
||||
message(FATAL_ERROR
|
||||
"BUILD_FRAMEWORK can not be on with IOS_PLATFORM enabled")
|
||||
endif ()
|
||||
|
||||
# iOS only uses static libraries
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE
|
||||
${PROJECT_SOURCE_DIR}/builds/cmake/iOS.cmake)
|
||||
endif ()
|
||||
else ()
|
||||
if (DEFINED IOS_PLATFORM)
|
||||
message(FATAL_ERROR "IOS_PLATFORM is not supported on this platform")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (WIN32 AND BUILD_SHARED_LIBS)
|
||||
message(FATAL_ERROR "Shared libraries not supported on Windows.")
|
||||
endif ()
|
||||
|
||||
|
||||
project(freetype)
|
||||
|
||||
|
||||
# Disallow in-source builds
|
||||
if ("${PROJECT_BINARY_DIR}" STREQUAL "${PROJECT_SOURCE_DIR}")
|
||||
message(FATAL_ERROR
|
||||
"
|
||||
In-source builds are not permitted! Make a separate folder for"
|
||||
" building, e.g.,"
|
||||
"
|
||||
mkdir build; cd build; cmake .."
|
||||
"
|
||||
Before that, remove the files created by this failed run with"
|
||||
"
|
||||
rm -rf CMakeCache.txt CMakeFiles")
|
||||
endif ()
|
||||
|
||||
|
||||
# Add local cmake modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/builds)
|
||||
|
||||
|
||||
if (BUILD_FRAMEWORK)
|
||||
if (NOT "${CMAKE_GENERATOR}" STREQUAL "Xcode")
|
||||
message(FATAL_ERROR
|
||||
"You should use Xcode generator with BUILD_FRAMEWORK enabled")
|
||||
endif ()
|
||||
set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)")
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif ()
|
||||
|
||||
|
||||
set(VERSION_MAJOR "2")
|
||||
set(VERSION_MINOR "6")
|
||||
set(VERSION_PATCH "0")
|
||||
|
||||
set(PROJECT_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
|
||||
set(SHARED_LIBRARY_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
|
||||
|
||||
|
||||
# Compiler definitions for building the library
|
||||
add_definitions(-DFT2_BUILD_LIBRARY)
|
||||
|
||||
|
||||
# Find dependencies
|
||||
find_package(ZLIB)
|
||||
find_package(BZip2)
|
||||
find_package(PNG)
|
||||
find_package(HarfBuzz)
|
||||
|
||||
|
||||
message(STATUS
|
||||
"Creating directory ${PROJECT_BINARY_DIR}/include/freetype/config")
|
||||
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/include/freetype/config")
|
||||
|
||||
|
||||
# Create the configuration file
|
||||
message(STATUS
|
||||
"Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h")
|
||||
|
||||
if (UNIX)
|
||||
check_include_file("unistd.h" HAVE_UNISTD_H)
|
||||
check_include_file("fcntl.h" HAVE_FCNTL_H)
|
||||
check_include_file("stdint.h" HAVE_STDINT_H)
|
||||
|
||||
file(READ "${PROJECT_SOURCE_DIR}/builds/unix/ftconfig.in"
|
||||
FTCONFIG_H)
|
||||
if (HAVE_UNISTD_H)
|
||||
string(REGEX REPLACE
|
||||
"#undef +(HAVE_UNISTD_H)" "#define \\1"
|
||||
FTCONFIG_H "${FTCONFIG_H}")
|
||||
endif ()
|
||||
if (HAVE_FCNTL_H)
|
||||
string(REGEX REPLACE
|
||||
"#undef +(HAVE_FCNTL_H)" "#define \\1"
|
||||
FTCONFIG_H "${FTCONFIG_H}")
|
||||
endif ()
|
||||
if (HAVE_STDINT_H)
|
||||
string(REGEX REPLACE
|
||||
"#undef +(HAVE_STDINT_H)" "#define \\1"
|
||||
FTCONFIG_H "${FTCONFIG_H}")
|
||||
endif ()
|
||||
string(REPLACE "/undef " "#undef "
|
||||
FTCONFIG_H "${FTCONFIG_H}")
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
|
||||
"${FTCONFIG_H}")
|
||||
else ()
|
||||
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
|
||||
FTCONFIG_H)
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h"
|
||||
"${FTCONFIG_H}")
|
||||
if (PLATFORM_LINUX AND CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_definitions(-DOMIM_FULL_FREETYPE)
|
||||
endif ()
|
||||
|
||||
add_compile_options(
|
||||
"-Wall"
|
||||
)
|
||||
|
||||
# Create the options file
|
||||
message(STATUS
|
||||
"Creating file ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h")
|
||||
include_directories(include)
|
||||
|
||||
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftoption.h"
|
||||
FTOPTION_H)
|
||||
if (ZLIB_FOUND)
|
||||
string(REGEX REPLACE
|
||||
"/\\* +(#define +FT_CONFIG_OPTION_SYSTEM_ZLIB) +\\*/" "\\1"
|
||||
FTOPTION_H "${FTOPTION_H}")
|
||||
endif ()
|
||||
if (BZIP2_FOUND)
|
||||
string(REGEX REPLACE
|
||||
"/\\* +(#define +FT_CONFIG_OPTION_USE_BZIP2) +\\*/" "\\1"
|
||||
FTOPTION_H "${FTOPTION_H}")
|
||||
endif ()
|
||||
if (PNG_FOUND)
|
||||
string(REGEX REPLACE
|
||||
"/\\* +(#define +FT_CONFIG_OPTION_USE_PNG) +\\*/" "\\1"
|
||||
FTOPTION_H "${FTOPTION_H}")
|
||||
endif ()
|
||||
if (HARFBUZZ_FOUND)
|
||||
string(REGEX REPLACE
|
||||
"/\\* +(#define +FT_CONFIG_OPTION_USE_HARFBUZZ) +\\*/" "\\1"
|
||||
FTOPTION_H "${FTOPTION_H}")
|
||||
endif ()
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h"
|
||||
"${FTOPTION_H}")
|
||||
|
||||
|
||||
# Specify library include directories
|
||||
include_directories("${PROJECT_SOURCE_DIR}/include")
|
||||
include_directories(BEFORE "${PROJECT_BINARY_DIR}/include")
|
||||
|
||||
|
||||
file(GLOB PUBLIC_HEADERS "include/ft2build.h" "include/freetype/*.h")
|
||||
file(GLOB PUBLIC_CONFIG_HEADERS "include/freetype/config/*.h")
|
||||
file(GLOB PRIVATE_HEADERS "include/freetype/internal/*.h")
|
||||
|
||||
|
||||
set(BASE_SRCS
|
||||
src/autofit/autofit.c
|
||||
src/base/ftbase.c
|
||||
src/base/ftbbox.c
|
||||
src/base/ftbdf.c
|
||||
set(
|
||||
SRC
|
||||
src/autofit/afangles.c
|
||||
src/autofit/afblue.c
|
||||
src/autofit/afcjk.c
|
||||
src/autofit/afdummy.c
|
||||
src/autofit/afglobal.c
|
||||
src/autofit/afhints.c
|
||||
src/autofit/afindic.c
|
||||
src/autofit/aflatin.c
|
||||
src/autofit/afloader.c
|
||||
src/autofit/afmodule.c
|
||||
src/autofit/afranges.c
|
||||
src/autofit/afwarp.c
|
||||
src/autofit/hbshim.c
|
||||
src/base/ftadvanc.c
|
||||
src/base/ftbitmap.c
|
||||
src/base/ftcid.c
|
||||
src/base/ftfntfmt.c
|
||||
src/base/ftfstype.c
|
||||
src/base/ftgasp.c
|
||||
src/base/ftcalc.c
|
||||
src/base/ftgloadr.c
|
||||
src/base/ftglyph.c
|
||||
src/base/ftgxval.c
|
||||
src/base/ftinit.c
|
||||
src/base/ftlcdfil.c
|
||||
src/base/ftmm.c
|
||||
src/base/ftotval.c
|
||||
src/base/ftpatent.c
|
||||
src/base/ftpfr.c
|
||||
src/base/ftobjs.c
|
||||
src/base/ftoutln.c
|
||||
src/base/ftrfork.c
|
||||
src/base/ftstream.c
|
||||
src/base/ftstroke.c
|
||||
src/base/ftsynth.c
|
||||
src/base/ftsystem.c
|
||||
src/base/fttype1.c
|
||||
src/base/ftwinfnt.c
|
||||
src/bdf/bdf.c
|
||||
src/bzip2/ftbzip2.c
|
||||
src/cache/ftcache.c
|
||||
src/cff/cff.c
|
||||
src/cid/type1cid.c
|
||||
src/base/fttrigon.c
|
||||
src/base/ftutil.c
|
||||
src/bdf/bdfdrivr.c
|
||||
src/bdf/bdflib.c
|
||||
src/cache/ftcbasic.c
|
||||
src/cache/ftccache.c
|
||||
src/cache/ftccmap.c
|
||||
src/cache/ftcglyph.c
|
||||
src/cache/ftcimage.c
|
||||
src/cache/ftcmanag.c
|
||||
src/cache/ftcmru.c
|
||||
src/cache/ftcsbits.c
|
||||
src/cache/ftstrokedcache.c
|
||||
src/cff/cf2arrst.c
|
||||
src/cff/cf2blues.c
|
||||
src/cff/cf2error.c
|
||||
src/cff/cf2font.c
|
||||
src/cff/cf2ft.c
|
||||
src/cff/cf2hints.c
|
||||
src/cff/cf2intrp.c
|
||||
src/cff/cf2read.c
|
||||
src/cff/cf2stack.c
|
||||
src/cff/cffcmap.c
|
||||
src/cff/cffdrivr.c
|
||||
src/cff/cffgload.c
|
||||
src/cff/cffload.c
|
||||
src/cff/cffobjs.c
|
||||
src/cff/cffparse.c
|
||||
src/cid/cidgload.c
|
||||
src/cid/cidload.c
|
||||
src/cid/cidobjs.c
|
||||
src/cid/cidparse.c
|
||||
src/cid/cidriver.c
|
||||
src/gzip/ftgzip.c
|
||||
src/lzw/ftlzw.c
|
||||
src/pcf/pcf.c
|
||||
src/pfr/pfr.c
|
||||
src/psaux/psaux.c
|
||||
src/pshinter/pshinter.c
|
||||
src/psnames/psnames.c
|
||||
src/raster/raster.c
|
||||
src/sfnt/sfnt.c
|
||||
src/smooth/smooth.c
|
||||
src/pcf/pcfdrivr.c
|
||||
src/pcf/pcfread.c
|
||||
src/pcf/pcfutil.c
|
||||
src/pfr/pfrcmap.c
|
||||
src/pfr/pfrdrivr.c
|
||||
src/pfr/pfrgload.c
|
||||
src/pfr/pfrload.c
|
||||
src/pfr/pfrobjs.c
|
||||
src/pfr/pfrsbit.c
|
||||
src/psaux/afmparse.c
|
||||
src/psaux/psauxmod.c
|
||||
src/psaux/psconv.c
|
||||
src/psaux/psobjs.c
|
||||
src/psaux/t1cmap.c
|
||||
src/psaux/t1decode.c
|
||||
src/pshinter/pshalgo.c
|
||||
src/pshinter/pshglob.c
|
||||
src/pshinter/pshmod.c
|
||||
src/pshinter/pshrec.c
|
||||
src/psnames/psmodule.c
|
||||
src/raster/ftraster.c
|
||||
src/raster/ftrend1.c
|
||||
src/sfnt/sfdriver.c
|
||||
src/sfnt/sfobjs.c
|
||||
src/sfnt/ttbdf.c
|
||||
src/sfnt/ttcmap.c
|
||||
src/sfnt/ttkern.c
|
||||
src/sfnt/ttload.c
|
||||
src/sfnt/ttmtx.c
|
||||
src/sfnt/ttpost.c
|
||||
src/sfnt/ttsbit.c
|
||||
src/smooth/ftgrays.c
|
||||
src/smooth/ftsmooth.c
|
||||
src/truetype/truetype.c
|
||||
src/type1/type1.c
|
||||
src/type1/t1afm.c
|
||||
src/type1/t1driver.c
|
||||
src/type1/t1gload.c
|
||||
src/type1/t1load.c
|
||||
src/type1/t1objs.c
|
||||
src/type1/t1parse.c
|
||||
src/type42/type42.c
|
||||
src/winfonts/winfnt.c
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
set(BASE_SRCS ${BASE_SRCS} builds/windows/ftdebug.c)
|
||||
elseif (WINCE)
|
||||
set(BASE_SRCS ${BASE_SRCS} builds/wince/ftdebug.c)
|
||||
else ()
|
||||
set(BASE_SRCS ${BASE_SRCS} src/base/ftdebug.c)
|
||||
endif ()
|
||||
|
||||
|
||||
if (BUILD_FRAMEWORK)
|
||||
set(BASE_SRCS
|
||||
${BASE_SRCS}
|
||||
builds/mac/freetype-Info.plist
|
||||
)
|
||||
endif ()
|
||||
|
||||
|
||||
add_library(freetype
|
||||
${PUBLIC_HEADERS}
|
||||
${PUBLIC_CONFIG_HEADERS}
|
||||
${PRIVATE_HEADERS}
|
||||
${BASE_SRCS}
|
||||
)
|
||||
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set_target_properties(freetype PROPERTIES
|
||||
VERSION ${PROJECT_VERSION}
|
||||
SOVERSION ${SHARED_LIBRARY_VERSION}
|
||||
COMPILE_DEFINITIONS freetype_EXPORTS
|
||||
)
|
||||
endif ()
|
||||
|
||||
|
||||
if (BUILD_FRAMEWORK)
|
||||
set_property(SOURCE ${PUBLIC_CONFIG_HEADERS}
|
||||
PROPERTY MACOSX_PACKAGE_LOCATION Headers/config
|
||||
)
|
||||
set_target_properties(freetype PROPERTIES
|
||||
FRAMEWORK TRUE
|
||||
MACOSX_FRAMEWORK_INFO_PLIST builds/mac/freetype-Info.plist
|
||||
PUBLIC_HEADER "${PUBLIC_HEADERS}"
|
||||
XCODE_ATTRIBUTE_INSTALL_PATH "@rpath"
|
||||
)
|
||||
endif ()
|
||||
|
||||
|
||||
if (MSVC)
|
||||
set_target_properties(freetype PROPERTIES
|
||||
COMPILE_FLAGS /Fd"$(IntDir)$(TargetName).pdb")
|
||||
endif ()
|
||||
|
||||
|
||||
if (ZLIB_FOUND)
|
||||
target_link_libraries(freetype ${ZLIB_LIBRARIES})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
endif ()
|
||||
if (BZIP2_FOUND)
|
||||
target_link_libraries(freetype ${BZIP2_LIBRARIES})
|
||||
include_directories(${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
|
||||
endif ()
|
||||
if (PNG_FOUND)
|
||||
add_definitions(${PNG_DEFINITIONS})
|
||||
target_link_libraries(freetype ${PNG_LIBRARIES})
|
||||
include_directories(${PNG_INCLUDE_DIRS})
|
||||
endif ()
|
||||
if (HARFBUZZ_FOUND)
|
||||
target_link_libraries(freetype ${HARFBUZZ_LIBRARIES})
|
||||
include_directories(${HARFBUZZ_INCLUDE_DIRS})
|
||||
endif ()
|
||||
|
||||
|
||||
# Installations
|
||||
# Note the trailing slash in the argument to the `DIRECTORY' directive
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
|
||||
DESTINATION include/freetype2
|
||||
PATTERN "internal" EXCLUDE
|
||||
PATTERN "ftconfig.h" EXCLUDE
|
||||
PATTERN "ftoption.h" EXCLUDE
|
||||
)
|
||||
install(FILES
|
||||
${PROJECT_BINARY_DIR}/include/freetype/config/ftconfig.h
|
||||
${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h
|
||||
DESTINATION include/freetype2/freetype/config
|
||||
)
|
||||
install(TARGETS freetype
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
FRAMEWORK DESTINATION Library/Frameworks
|
||||
)
|
||||
|
||||
|
||||
# Packaging
|
||||
# CPack version numbers for release tarball name.
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}})
|
||||
if (NOT DEFINED CPACK_PACKAGE_DESCRIPTION_SUMMARY)
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CMAKE_PROJECT_NAME}")
|
||||
endif ()
|
||||
if (NOT DEFINED CPACK_SOURCE_PACKAGE_FILE_NAME)
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
||||
"${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}-r${PROJECT_REV}"
|
||||
CACHE INTERNAL "tarball basename"
|
||||
)
|
||||
endif ()
|
||||
set(CPACK_SOURCE_GENERATOR TGZ)
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
"/CVS/;/.svn/;.swp$;.#;/#;/build/;/serial/;/ser/;/parallel/;/par/;~;/preconfig.out;/autom4te.cache/;/.config")
|
||||
set(CPACK_GENERATOR TGZ)
|
||||
include(CPack)
|
||||
|
||||
|
||||
# add make dist target
|
||||
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
|
||||
|
||||
|
||||
# eof
|
||||
add_library(${PROJECT_NAME} ${SRC})
|
||||
|
|
57
3party/fribidi/CMakeLists.txt
Normal file
57
3party/fribidi/CMakeLists.txt
Normal file
|
@ -0,0 +1,57 @@
|
|||
project(fribidi)
|
||||
|
||||
include_directories(lib ./)
|
||||
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
add_compile_options(
|
||||
"-Wall"
|
||||
)
|
||||
|
||||
set(
|
||||
SRC
|
||||
config_android.h
|
||||
config_ios.h
|
||||
config_mac.h
|
||||
config_tizen.h
|
||||
config_win32.h
|
||||
config.h
|
||||
lib/bidi-types.h
|
||||
lib/common.h
|
||||
lib/debug.h
|
||||
lib/fribidi-arabic.c
|
||||
lib/fribidi-arabic.h
|
||||
lib/fribidi-begindecls.h
|
||||
lib/fribidi-bidi-types-list.h
|
||||
lib/fribidi-bidi-types.c
|
||||
lib/fribidi-bidi-types.h
|
||||
lib/fribidi-bidi.c
|
||||
lib/fribidi-bidi.h
|
||||
lib/fribidi-common.h
|
||||
lib/fribidi-config.h
|
||||
lib/fribidi-deprecated.c
|
||||
lib/fribidi-deprecated.h
|
||||
lib/fribidi-enddecls.h
|
||||
lib/fribidi-flags.h
|
||||
lib/fribidi-joining-types-list.h
|
||||
lib/fribidi-joining-types.c
|
||||
lib/fribidi-joining-types.h
|
||||
lib/fribidi-joining.c
|
||||
lib/fribidi-joining.h
|
||||
lib/fribidi-mem.c
|
||||
lib/fribidi-mirroring.c
|
||||
lib/fribidi-mirroring.h
|
||||
lib/fribidi-run.c
|
||||
lib/fribidi-shape.c
|
||||
lib/fribidi-shape.h
|
||||
lib/fribidi-types.h
|
||||
lib/fribidi-unicode-version.h
|
||||
lib/fribidi-unicode.h
|
||||
lib/fribidi.c
|
||||
lib/fribidi.h
|
||||
lib/joining-types.h
|
||||
lib/mem.h
|
||||
lib/run.h
|
||||
)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SRC})
|
39
3party/gmock/CMakeLists.txt
Normal file
39
3party/gmock/CMakeLists.txt
Normal file
|
@ -0,0 +1,39 @@
|
|||
project(gmock)
|
||||
|
||||
include_directories(. gtest gtest/include include)
|
||||
|
||||
set(
|
||||
SRC
|
||||
gtest/src/gtest-all.cc
|
||||
gtest/src/gtest-death-test.cc
|
||||
gtest/src/gtest-filepath.cc
|
||||
gtest/src/gtest-internal-inl.h
|
||||
gtest/src/gtest-port.cc
|
||||
gtest/src/gtest-printers.cc
|
||||
gtest/src/gtest-test-part.cc
|
||||
gtest/src/gtest-typed-test.cc
|
||||
gtest/src/gtest.cc
|
||||
include/gmock/gmock-actions.h
|
||||
include/gmock/gmock-cardinalities.h
|
||||
include/gmock/gmock-generated-actions.h
|
||||
include/gmock/gmock-generated-function-mockers.h
|
||||
include/gmock/gmock-generated-matchers.h
|
||||
include/gmock/gmock-generated-nice-strict.h
|
||||
include/gmock/gmock-matchers.h
|
||||
include/gmock/gmock-more-actions.h
|
||||
include/gmock/gmock-more-matchers.h
|
||||
include/gmock/gmock-spec-builders.h
|
||||
include/gmock/gmock.h
|
||||
include/gmock/internal/gmock-generated-internal-utils.h
|
||||
include/gmock/internal/gmock-internal-utils.h
|
||||
include/gmock/internal/gmock-port.h
|
||||
src/gmock-all.cc
|
||||
src/gmock-cardinalities.cc
|
||||
src/gmock-internal-utils.cc
|
||||
src/gmock-matchers.cc
|
||||
src/gmock-spec-builders.cc
|
||||
src/gmock.cc
|
||||
src/gmock_main.cc
|
||||
)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SRC})
|
29
3party/osrm/CMakeLists.txt
Normal file
29
3party/osrm/CMakeLists.txt
Normal file
|
@ -0,0 +1,29 @@
|
|||
project(osrm)
|
||||
|
||||
add_definitions(-DBOOST_ERROR_CODE_HEADER_ONLY)
|
||||
include_directories(
|
||||
${OMIM_ROOT}/3party/osrm/osrm-backend/include
|
||||
${OMIM_ROOT}/3party/osrm/osrm-backend/third_party
|
||||
)
|
||||
|
||||
set(
|
||||
SRC
|
||||
boost_stub.cpp
|
||||
osrm-backend/data_structures/coordinate.cpp
|
||||
osrm-backend/data_structures/coordinate_calculation.hpp
|
||||
osrm-backend/data_structures/coordinate_calculation.cpp
|
||||
osrm-backend/data_structures/search_engine_data.cpp
|
||||
osrm-backend/data_structures/phantom_node.cpp
|
||||
osrm-backend/util/mercator.cpp
|
||||
osrm-backend/util/mercator.hpp
|
||||
)
|
||||
|
||||
# if (APPLE)
|
||||
# target_compile_options(${PROJECT_NAME} PUBLIC "-fobjc-arc")
|
||||
#endif()
|
||||
|
||||
add_library(${PROJECT_NAME} ${SRC})
|
||||
|
||||
#omim_add_test_subdirectory(osrm_tests)
|
||||
#omim_add_test(${project} ${SRC})
|
||||
# omim_link_libraries(osrm ...)
|
|
@ -9,14 +9,11 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|||
find_package(Threads)
|
||||
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5Network REQUIRED)
|
||||
find_package(Qt5Gui REQUIRED)
|
||||
find_package(Qt5Network REQUIRED)
|
||||
find_package(Qt5OpenGL REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
|
||||
if (APPLE)
|
||||
find_library(APL_SYSCON SystemConfiguration)
|
||||
endif()
|
||||
|
||||
find_library(LIBZ NAMES z)
|
||||
if (LIBZ STREQUAL "LIBZ-NOTFOUND")
|
||||
message(FATAL_ERROR "Failed to find libz library.")
|
||||
|
@ -132,6 +129,11 @@ endmacro()
|
|||
add_subdirectory(3party/jansson)
|
||||
add_subdirectory(3party/minizip)
|
||||
add_subdirectory(3party/tomcrypt)
|
||||
add_subdirectory(3party/freetype)
|
||||
add_subdirectory(3party/fribidi)
|
||||
add_subdirectory(3party/expat)
|
||||
add_subdirectory(map)
|
||||
add_subdirectory(drape)
|
||||
|
||||
add_compile_options(
|
||||
"-Wall"
|
||||
|
@ -142,7 +144,9 @@ add_subdirectory(3party/protobuf)
|
|||
add_subdirectory(3party/liboauthcpp)
|
||||
add_subdirectory(3party/pugixml)
|
||||
add_subdirectory(3party/succinct)
|
||||
|
||||
add_subdirectory(3party/osrm)
|
||||
add_subdirectory(3party/gmock)
|
||||
add_subdirectory(qt_tstfrm)
|
||||
add_subdirectory(base)
|
||||
add_subdirectory(coding)
|
||||
add_subdirectory(geometry)
|
||||
|
@ -152,5 +156,6 @@ add_subdirectory(stats)
|
|||
add_subdirectory(storage)
|
||||
add_subdirectory(editor)
|
||||
add_subdirectory(indexer)
|
||||
add_subdirectory(routing)
|
||||
add_subdirectory(search)
|
||||
add_subdirectory(tracking)
|
||||
|
|
142
drape/CMakeLists.txt
Normal file
142
drape/CMakeLists.txt
Normal file
|
@ -0,0 +1,142 @@
|
|||
project(drape)
|
||||
|
||||
get_filename_component(DRAPE_ROOT ${PROJECT_SOURCE_DIR} ABSOLUTE)
|
||||
|
||||
execute_process(
|
||||
COMMAND python ${OMIM_ROOT}/tools/autobuild/shader_preprocessor.py
|
||||
${DRAPE_ROOT}/shaders
|
||||
shader_index.txt
|
||||
shader_def
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${OMIM_ROOT}/3party/freetype/include
|
||||
${OMIM_ROOT}/3party/glm
|
||||
)
|
||||
|
||||
append(CMAKE_CXX_FLAGS "-std=c++11 ")
|
||||
|
||||
set(
|
||||
DRAPE_COMMON_SRC
|
||||
${DRAPE_ROOT}/attribute_buffer_mutator.cpp
|
||||
${DRAPE_ROOT}/attribute_buffer_mutator.hpp
|
||||
${DRAPE_ROOT}/attribute_provider.cpp
|
||||
${DRAPE_ROOT}/attribute_provider.hpp
|
||||
${DRAPE_ROOT}/batcher.cpp
|
||||
${DRAPE_ROOT}/batcher.hpp
|
||||
${DRAPE_ROOT}/batcher_helpers.cpp
|
||||
${DRAPE_ROOT}/batcher_helpers.hpp
|
||||
${DRAPE_ROOT}/binding_info.cpp
|
||||
${DRAPE_ROOT}/binding_info.hpp
|
||||
${DRAPE_ROOT}/buffer_base.cpp
|
||||
${DRAPE_ROOT}/buffer_base.hpp
|
||||
${DRAPE_ROOT}/color.cpp
|
||||
${DRAPE_ROOT}/color.hpp
|
||||
${DRAPE_ROOT}/constants.hpp
|
||||
${DRAPE_ROOT}/cpu_buffer.cpp
|
||||
${DRAPE_ROOT}/cpu_buffer.hpp
|
||||
${DRAPE_ROOT}/data_buffer.cpp
|
||||
${DRAPE_ROOT}/data_buffer.hpp
|
||||
${DRAPE_ROOT}/data_buffer_impl.hpp
|
||||
${DRAPE_ROOT}/debug_rect_renderer.cpp
|
||||
${DRAPE_ROOT}/debug_rect_renderer.hpp
|
||||
${DRAPE_ROOT}/drape_global.hpp
|
||||
${DRAPE_ROOT}/dynamic_texture.hpp
|
||||
${DRAPE_ROOT}/font_texture.cpp
|
||||
${DRAPE_ROOT}/font_texture.hpp
|
||||
${DRAPE_ROOT}/fribidi.cpp
|
||||
${DRAPE_ROOT}/fribidi.hpp
|
||||
${DRAPE_ROOT}/glconstants.cpp
|
||||
${DRAPE_ROOT}/glconstants.hpp
|
||||
${DRAPE_ROOT}/glextensions_list.cpp
|
||||
${DRAPE_ROOT}/glextensions_list.hpp
|
||||
${DRAPE_ROOT}/glfunctions.hpp
|
||||
${DRAPE_ROOT}/glIncludes.hpp
|
||||
${DRAPE_ROOT}/glsl_func.hpp
|
||||
${DRAPE_ROOT}/glsl_types.hpp
|
||||
${DRAPE_ROOT}/glstate.cpp
|
||||
${DRAPE_ROOT}/glstate.hpp
|
||||
${DRAPE_ROOT}/glyph_manager.cpp
|
||||
${DRAPE_ROOT}/glyph_manager.hpp
|
||||
${DRAPE_ROOT}/gpu_buffer.cpp
|
||||
${DRAPE_ROOT}/gpu_buffer.hpp
|
||||
${DRAPE_ROOT}/gpu_program.cpp
|
||||
${DRAPE_ROOT}/gpu_program.hpp
|
||||
${DRAPE_ROOT}/gpu_program_manager.cpp
|
||||
${DRAPE_ROOT}/gpu_program_manager.hpp
|
||||
${DRAPE_ROOT}/hw_texture.cpp
|
||||
${DRAPE_ROOT}/hw_texture.hpp
|
||||
${DRAPE_ROOT}/index_buffer.cpp
|
||||
${DRAPE_ROOT}/index_buffer.hpp
|
||||
${DRAPE_ROOT}/index_buffer_mutator.cpp
|
||||
${DRAPE_ROOT}/index_buffer_mutator.hpp
|
||||
${DRAPE_ROOT}/index_storage.cpp
|
||||
${DRAPE_ROOT}/index_storage.hpp
|
||||
${DRAPE_ROOT}/object_pool.hpp
|
||||
${DRAPE_ROOT}/oglcontext.hpp
|
||||
${DRAPE_ROOT}/oglcontextfactory.cpp
|
||||
${DRAPE_ROOT}/oglcontextfactory.hpp
|
||||
${DRAPE_ROOT}/overlay_handle.cpp
|
||||
${DRAPE_ROOT}/overlay_handle.hpp
|
||||
${DRAPE_ROOT}/overlay_tree.cpp
|
||||
${DRAPE_ROOT}/overlay_tree.hpp
|
||||
${DRAPE_ROOT}/pointers.cpp
|
||||
${DRAPE_ROOT}/pointers.hpp
|
||||
${DRAPE_ROOT}/render_bucket.cpp
|
||||
${DRAPE_ROOT}/render_bucket.hpp
|
||||
${DRAPE_ROOT}/shader.cpp
|
||||
${DRAPE_ROOT}/shader.hpp
|
||||
${DRAPE_ROOT}/shader_def.cpp
|
||||
${DRAPE_ROOT}/shader_def.hpp
|
||||
${DRAPE_ROOT}/static_texture.cpp
|
||||
${DRAPE_ROOT}/static_texture.hpp
|
||||
${DRAPE_ROOT}/stipple_pen_resource.cpp
|
||||
${DRAPE_ROOT}/stipple_pen_resource.hpp
|
||||
${DRAPE_ROOT}/support_manager.cpp
|
||||
${DRAPE_ROOT}/support_manager.hpp
|
||||
${DRAPE_ROOT}/symbols_texture.cpp
|
||||
${DRAPE_ROOT}/symbols_texture.hpp
|
||||
${DRAPE_ROOT}/texture.cpp
|
||||
${DRAPE_ROOT}/texture.hpp
|
||||
${DRAPE_ROOT}/texture_manager.cpp
|
||||
${DRAPE_ROOT}/texture_manager.hpp
|
||||
${DRAPE_ROOT}/texture_of_colors.cpp
|
||||
${DRAPE_ROOT}/texture_of_colors.hpp
|
||||
${DRAPE_ROOT}/uniform_value.cpp
|
||||
${DRAPE_ROOT}/uniform_value.hpp
|
||||
${DRAPE_ROOT}/uniform_values_storage.cpp
|
||||
${DRAPE_ROOT}/uniform_values_storage.hpp
|
||||
${DRAPE_ROOT}/utils/glyph_usage_tracker.cpp
|
||||
${DRAPE_ROOT}/utils/glyph_usage_tracker.hpp
|
||||
${DRAPE_ROOT}/utils/gpu_mem_tracker.cpp
|
||||
${DRAPE_ROOT}/utils/gpu_mem_tracker.hpp
|
||||
${DRAPE_ROOT}/utils/projection.cpp
|
||||
${DRAPE_ROOT}/utils/projection.hpp
|
||||
${DRAPE_ROOT}/utils/vertex_decl.cpp
|
||||
${DRAPE_ROOT}/utils/vertex_decl.hpp
|
||||
${DRAPE_ROOT}/vertex_array_buffer.cpp
|
||||
${DRAPE_ROOT}/vertex_array_buffer.hpp
|
||||
${DRAPE_ROOT}/visual_scale.hpp
|
||||
|
||||
${OMIM_ROOT}/3party/sdf_image/sdf_image.cpp
|
||||
${OMIM_ROOT}/3party/sdf_image/sdf_image.h
|
||||
${OMIM_ROOT}/3party/stb_image/stb_image.c
|
||||
${OMIM_ROOT}/3party/stb_image/stb_image.h
|
||||
)
|
||||
|
||||
set(
|
||||
SRC
|
||||
glfunctions.cpp
|
||||
)
|
||||
|
||||
if (PLATFORM_IOS)
|
||||
append(
|
||||
SRC
|
||||
hw_texture_ios.hpp
|
||||
hw_texture_ios.mm
|
||||
)
|
||||
endif()
|
||||
|
||||
add_library(${PROJECT_NAME} ${DRAPE_COMMON_SRC} ${SRC})
|
||||
|
||||
omim_add_test_subdirectory(drape_tests)
|
78
drape/drape_tests/CMakeLists.txt
Normal file
78
drape/drape_tests/CMakeLists.txt
Normal file
|
@ -0,0 +1,78 @@
|
|||
project(drape_tests)
|
||||
|
||||
execute_process(
|
||||
COMMAND python ${OMIM_ROOT}/tools/autobuild/shader_preprocessor.py
|
||||
${DRAPE_ROOT}/shaders
|
||||
shader_index.txt
|
||||
shader_def
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-DOGL_TEST_ENABLED
|
||||
-DGTEST_DONT_DEFINE_TEST
|
||||
-DCOMPILER_TESTS
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${OMIM_ROOT}/3party/gmock/include
|
||||
${OMIM_ROOT}/3party/gmock/gtest/include
|
||||
${OMIM_ROOT}/3party/freetype/include
|
||||
)
|
||||
|
||||
set(
|
||||
SRC
|
||||
attribute_provides_tests.cpp
|
||||
batcher_tests.cpp
|
||||
bingind_info_tests.cpp
|
||||
buffer_tests.cpp
|
||||
compile_shaders_test.cpp
|
||||
dummy_texture.hpp
|
||||
failure_reporter.cpp
|
||||
font_texture_tests.cpp
|
||||
fribidi_tests.cpp
|
||||
glfunctions.cpp
|
||||
glmock_functions.cpp
|
||||
glmock_functions.hpp
|
||||
glyph_mng_tests.cpp
|
||||
glyph_packer_test.cpp
|
||||
img.cpp
|
||||
img.hpp
|
||||
memory_comparer.hpp
|
||||
pointers_tests.cpp
|
||||
stipple_pen_tests.cpp
|
||||
texture_of_colors_tests.cpp
|
||||
testingmain.cpp
|
||||
uniform_value_tests.cpp
|
||||
)
|
||||
|
||||
add_executable(${PROJECT_NAME} ${DRAPE_COMMON_SRC} ${SRC})
|
||||
|
||||
omim_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
qt_tstfrm
|
||||
indexer
|
||||
platform
|
||||
coding
|
||||
geometry
|
||||
base
|
||||
fribidi
|
||||
expat
|
||||
tomcrypt
|
||||
stats_client
|
||||
freetype
|
||||
gmock
|
||||
${Qt5Core_LIBRARIES}
|
||||
${Qt5Gui_LIBRARIES}
|
||||
${Qt5Widgets_LIBRARIES}
|
||||
${LIBZ}
|
||||
)
|
||||
|
||||
if (PLATFORM_MAC)
|
||||
omim_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
"-framework IOKit"
|
||||
"-framework Cocoa"
|
||||
"-framework CoreLocation"
|
||||
"-framework SystemConfiguration"
|
||||
)
|
||||
endif()
|
64
map/CMakeLists.txt
Normal file
64
map/CMakeLists.txt
Normal file
|
@ -0,0 +1,64 @@
|
|||
project(map)
|
||||
|
||||
include_directories(
|
||||
${OMIM_ROOT}/3party/protobuf/src
|
||||
${OMIM_ROOT}/3party/freetype/include
|
||||
${OMIM_ROOT}/3party/jansson/src
|
||||
${OMIM_ROOT}/3party/glm
|
||||
)
|
||||
|
||||
append(CMAKE_CXX_FLAGS "-std=c++11")
|
||||
|
||||
set(
|
||||
SRC
|
||||
../api/src/c/api-client.c
|
||||
address_finder.cpp
|
||||
api_mark_point.cpp
|
||||
api_mark_point.hpp
|
||||
bookmark_manager.cpp
|
||||
bookmark_manager.hpp
|
||||
bookmark.cpp
|
||||
bookmark.hpp
|
||||
chart_generator.cpp
|
||||
chart_generator.hpp
|
||||
displacement_mode_manager.cpp
|
||||
displacement_mode_manager.hpp
|
||||
feature_vec_model.cpp
|
||||
feature_vec_model.hpp
|
||||
framework.cpp
|
||||
framework.hpp
|
||||
ge0_parser.cpp
|
||||
ge0_parser.hpp
|
||||
geourl_process.cpp
|
||||
geourl_process.hpp
|
||||
gps_track_collection.cpp
|
||||
gps_track_collection.hpp
|
||||
gps_track_filter.cpp
|
||||
gps_track_filter.hpp
|
||||
gps_track_storage.cpp
|
||||
gps_track_storage.hpp
|
||||
gps_track.cpp
|
||||
gps_track.hpp
|
||||
gps_tracker.cpp
|
||||
gps_tracker.hpp
|
||||
mwm_url.cpp
|
||||
mwm_url.hpp
|
||||
place_page_info.cpp
|
||||
place_page_info.hpp
|
||||
track.cpp
|
||||
track.hpp
|
||||
user_mark_container.cpp
|
||||
user_mark_container.hpp
|
||||
user_mark.cpp
|
||||
user_mark.hpp
|
||||
)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SRC})
|
||||
|
||||
if (NOT PLATFORM_IPHONE AND NOT PLATFORM_ANDROID)
|
||||
include_directories(
|
||||
${Qt5OpenGL_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
omim_add_test_subdirectory(mwm_tests)
|
51
map/mwm_tests/CMakeLists.txt
Normal file
51
map/mwm_tests/CMakeLists.txt
Normal file
|
@ -0,0 +1,51 @@
|
|||
project(mwm_tests)
|
||||
|
||||
add_compile_options(
|
||||
"-Wall"
|
||||
"-std=c++11"
|
||||
)
|
||||
|
||||
set(
|
||||
SRC
|
||||
multithread_mwm_test.cpp
|
||||
mwm_foreach_test.cpp
|
||||
mwm_index_test.cpp
|
||||
)
|
||||
|
||||
omim_add_test(${PROJECT_NAME} ${SRC})
|
||||
omim_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
map
|
||||
search
|
||||
storage
|
||||
indexer
|
||||
editor
|
||||
platform
|
||||
geometry
|
||||
coding
|
||||
base
|
||||
opening_hours
|
||||
freetype
|
||||
fribidi
|
||||
expat
|
||||
oauthcpp
|
||||
protobuf
|
||||
tomcrypt
|
||||
jansson
|
||||
succinct
|
||||
pugixml
|
||||
stats_client
|
||||
${Qt5Core_LIBRARIES}
|
||||
${Qt5OpenGL_LIBRARIES}
|
||||
${LIBZ}
|
||||
)
|
||||
|
||||
if (PLATFORM_MAC)
|
||||
omim_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
"-framework Cocoa"
|
||||
"-framework IOKit"
|
||||
"-framework QuartzCore"
|
||||
"-framework SystemConfiguration"
|
||||
)
|
||||
endif()
|
|
@ -1,7 +1,6 @@
|
|||
project(platform_tests)
|
||||
|
||||
add_definitions(-DOMIM_UNIT_TEST_WITH_QT_EVENT_LOOP)
|
||||
include_directories(${APL_SYSCON})
|
||||
|
||||
set(
|
||||
SRC
|
||||
|
|
9
qt_tstfrm/CMakeLists.txt
Normal file
9
qt_tstfrm/CMakeLists.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
project(qt_tstfrm)
|
||||
|
||||
set(
|
||||
SRC
|
||||
test_main_loop.hpp
|
||||
test_main_loop.cpp
|
||||
)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SRC})
|
95
routing/CMakeLists.txt
Normal file
95
routing/CMakeLists.txt
Normal file
|
@ -0,0 +1,95 @@
|
|||
project(routing)
|
||||
|
||||
include_directories(
|
||||
.
|
||||
${OMIM_ROOT}/3party/jansson/src
|
||||
${OMIM_ROOT}/3party/osrm/osrm-backend/include
|
||||
${OMIM_ROOT}/3party/osrm/osrm-backend/third_party
|
||||
)
|
||||
|
||||
set(
|
||||
SRC
|
||||
async_router.cpp
|
||||
async_router.hpp
|
||||
base/astar_algorithm.hpp
|
||||
base/followed_polyline.cpp
|
||||
base/followed_polyline.hpp
|
||||
bicycle_directions.cpp
|
||||
bicycle_directions.hpp
|
||||
bicycle_model.cpp
|
||||
bicycle_model.hpp
|
||||
car_model.cpp
|
||||
car_model.hpp
|
||||
car_router.cpp
|
||||
car_router.hpp
|
||||
cross_mwm_road_graph.cpp
|
||||
cross_mwm_road_graph.hpp
|
||||
cross_mwm_router.cpp
|
||||
cross_mwm_router.hpp
|
||||
cross_routing_context.cpp
|
||||
cross_routing_context.hpp
|
||||
directions_engine.cpp
|
||||
directions_engine.hpp
|
||||
features_road_graph.cpp
|
||||
features_road_graph.hpp
|
||||
loaded_path_segment.hpp
|
||||
nearest_edge_finder.cpp
|
||||
nearest_edge_finder.hpp
|
||||
online_absent_fetcher.cpp
|
||||
online_absent_fetcher.hpp
|
||||
online_cross_fetcher.cpp
|
||||
online_cross_fetcher.hpp
|
||||
osrm_data_facade.hpp
|
||||
osrm_engine.cpp
|
||||
osrm_engine.hpp
|
||||
osrm_helpers.cpp
|
||||
osrm_helpers.hpp
|
||||
osrm_path_segment_factory.cpp
|
||||
osrm_path_segment_factory.hpp
|
||||
osrm2feature_map.cpp
|
||||
osrm2feature_map.hpp
|
||||
pedestrian_directions.cpp
|
||||
pedestrian_directions.hpp
|
||||
pedestrian_model.cpp
|
||||
pedestrian_model.hpp
|
||||
road_graph_router.cpp
|
||||
road_graph_router.hpp
|
||||
road_graph.cpp
|
||||
road_graph.hpp
|
||||
route.cpp
|
||||
route.hpp
|
||||
router_delegate.cpp
|
||||
router_delegate.hpp
|
||||
router.cpp
|
||||
router.hpp
|
||||
routing_algorithm.cpp
|
||||
routing_algorithm.hpp
|
||||
routing_helpers.hpp
|
||||
routing_mapping.cpp
|
||||
routing_mapping.hpp
|
||||
routing_result_graph.hpp
|
||||
routing_session.cpp
|
||||
routing_session.hpp
|
||||
routing_settings.hpp
|
||||
speed_camera.cpp
|
||||
speed_camera.hpp
|
||||
turn_candidate.hpp
|
||||
turns_generator.cpp
|
||||
turns_generator.hpp
|
||||
turns_notification_manager.cpp
|
||||
turns_notification_manager.hpp
|
||||
turns_sound_settings.cpp
|
||||
turns_sound_settings.hpp
|
||||
turns_tts_text.cpp
|
||||
turns_tts_text.hpp
|
||||
turns.cpp
|
||||
turns.hpp
|
||||
vehicle_model.cpp
|
||||
vehicle_model.hpp
|
||||
)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SRC})
|
||||
omim_add_test_subdirectory(routing_tests)
|
||||
omim_add_test_subdirectory(routing_integration_tests)
|
||||
|
||||
|
63
routing/routing_integration_tests/CMakeLists.txt
Normal file
63
routing/routing_integration_tests/CMakeLists.txt
Normal file
|
@ -0,0 +1,63 @@
|
|||
# This subproject implements integration tests.
|
||||
# This tests are launched on the whole world dataset.
|
||||
|
||||
# It is recommended to place tests here in the following cases:
|
||||
# - tests are written to be launch on the whole world dataset;
|
||||
# - tests covers significant number of subsystems;
|
||||
|
||||
project(routing_integration_tests)
|
||||
|
||||
set(
|
||||
SRC
|
||||
bicycle_route_test.cpp
|
||||
bicycle_turn_test.cpp
|
||||
cross_section_tests.cpp
|
||||
get_altitude_test.cpp
|
||||
online_cross_tests.cpp
|
||||
osrm_route_test.cpp
|
||||
osrm_street_names_test.cpp
|
||||
osrm_turn_test.cpp
|
||||
pedestrian_route_test.cpp
|
||||
routing_test_tools.cpp
|
||||
routing_test_tools.hpp
|
||||
)
|
||||
|
||||
# if (APPLE)
|
||||
# target_compile_options(${PROJECT_NAME} PUBLIC "-fobjc-arc")
|
||||
#endif()
|
||||
|
||||
|
||||
omim_add_test(${PROJECT_NAME} ${SRC})
|
||||
omim_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
map
|
||||
routing
|
||||
search
|
||||
storage
|
||||
indexer
|
||||
editor
|
||||
platform
|
||||
oauthcpp
|
||||
geometry
|
||||
coding
|
||||
base
|
||||
osrm
|
||||
jansson
|
||||
protobuf
|
||||
tomcrypt
|
||||
succinct
|
||||
stats_client
|
||||
pugixml
|
||||
opening_hours
|
||||
${Qt5Core_LIBRARIES}
|
||||
${LIBZ}
|
||||
)
|
||||
|
||||
if (PLATFORM_MAC)
|
||||
omim_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
"-framework Cocoa"
|
||||
"-framework IOKit"
|
||||
"-framework SystemConfiguration"
|
||||
)
|
||||
endif()
|
61
routing/routing_tests/CMakeLists.txt
Normal file
61
routing/routing_tests/CMakeLists.txt
Normal file
|
@ -0,0 +1,61 @@
|
|||
project(routing_tests)
|
||||
|
||||
include_directories(${OMIM_ROOT}/3party/osrm/osrm-backend/include)
|
||||
|
||||
set(
|
||||
SRC
|
||||
astar_algorithm_test.cpp
|
||||
astar_progress_test.cpp
|
||||
astar_router_test.cpp
|
||||
async_router_test.cpp
|
||||
cross_routing_tests.cpp
|
||||
followed_polyline_test.cpp
|
||||
nearest_edge_finder_tests.cpp
|
||||
online_cross_fetcher_test.cpp
|
||||
osrm_router_test.cpp
|
||||
road_graph_builder.cpp
|
||||
road_graph_builder.hpp
|
||||
road_graph_nearest_edges_test.cpp
|
||||
route_tests.cpp
|
||||
routing_mapping_test.cpp
|
||||
routing_session_test.cpp
|
||||
turns_generator_test.cpp
|
||||
turns_sound_test.cpp
|
||||
turns_tts_text_tests.cpp
|
||||
vehicle_model_test.cpp
|
||||
)
|
||||
|
||||
omim_add_test(${PROJECT_NAME} ${SRC})
|
||||
omim_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
routing
|
||||
indexer
|
||||
platform_tests_support
|
||||
editor
|
||||
platform
|
||||
oauthcpp
|
||||
geometry
|
||||
coding
|
||||
base
|
||||
osrm
|
||||
protobuf
|
||||
tomcrypt
|
||||
succinct
|
||||
opening_hours
|
||||
jansson
|
||||
stats_client
|
||||
map
|
||||
pugixml
|
||||
stats_client
|
||||
${Qt5Core_LIBRARIES}
|
||||
${LIBZ}
|
||||
)
|
||||
|
||||
if (PLATFORM_MAC)
|
||||
omim_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
"-framework Cocoa"
|
||||
"-framework IOKit"
|
||||
"-framework SystemConfiguration"
|
||||
)
|
||||
endif()
|
109
tools/unix/cmake_omim.sh
Executable file
109
tools/unix/cmake_omim.sh
Executable file
|
@ -0,0 +1,109 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -u -e -x
|
||||
|
||||
OPT_DEBUG=
|
||||
OPT_RELEASE=1
|
||||
OPT_OSRM=
|
||||
OPT_CLEAN=
|
||||
VERBOSE=
|
||||
while getopts ":cdrov" opt; do
|
||||
case $opt in
|
||||
d)
|
||||
OPT_DEBUG=1
|
||||
OPT_RELEASE=
|
||||
;;
|
||||
r)
|
||||
OPT_RELEASE=1
|
||||
;;
|
||||
o)
|
||||
# OPT_OSRM=1
|
||||
echo "OSRM build is not supported yet, try again later"
|
||||
exit 1
|
||||
;;
|
||||
c)
|
||||
OPT_CLEAN=1
|
||||
;;
|
||||
v)
|
||||
VERBOSE=1
|
||||
;;
|
||||
*)
|
||||
echo "This tool builds omim and osrm-backend."
|
||||
echo "Usage: $0 [-d] [-r] [-o] [-c]"
|
||||
echo
|
||||
echo -e "-d\tBuild omim-debug"
|
||||
echo -e "-r\tBuild omim-release"
|
||||
echo -e "-o\tBuild osrm-backend"
|
||||
echo -e "-c\tClean before building"
|
||||
echo
|
||||
echo "By default release is built. Specify TARGET and OSRM_TARGET if needed."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
done
|
||||
|
||||
OMIM_PATH="$(cd "${OMIM_PATH:-$(dirname "$0")/../..}"; pwd)"
|
||||
|
||||
check_private_h()
|
||||
{
|
||||
if ! grep "DEFAULT_URLS_JSON" "$OMIM_PATH/private.h" >/dev/null 2>/dev/null; then
|
||||
echo "Please run $OMIM_PATH/configure.sh"
|
||||
exit 2
|
||||
fi
|
||||
}
|
||||
|
||||
set_platform_dependent_options()
|
||||
{
|
||||
if [ "$(uname -s)" == "Darwin" ]; then
|
||||
PROCESSES=$(sysctl -n hw.ncpu)
|
||||
else
|
||||
PROCESSES=$(nproc)
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
fi
|
||||
}
|
||||
|
||||
build_conf()
|
||||
{
|
||||
CONF=$1
|
||||
POSTFIX=$(echo "${CONF}" | tr '[:upper:]' '[:lower:]')
|
||||
echo $POSTFIX
|
||||
DIRNAME="${TARGET:-$OMIM_PATH/../omim-build-$POSTFIX}"
|
||||
[ -d "$DIRNAME" -a -n "$OPT_CLEAN" ] && rm -r "$DIRNAME"
|
||||
|
||||
if [ ! -d "$DIRNAME" ]; then
|
||||
mkdir -p "$DIRNAME"
|
||||
ln -s "$OMIM_PATH/data" "$DIRNAME/data"
|
||||
fi
|
||||
|
||||
TARGET="$DIRNAME/out/$POSTFIX"
|
||||
mkdir -p $TARGET
|
||||
|
||||
cd "$TARGET"
|
||||
cmake "$OMIM_PATH" -DCMAKE_BUILD_TYPE=$CONF
|
||||
if [ $VERBOSE ]; then
|
||||
make -j $PROCESSES VERBOSE=1
|
||||
else
|
||||
make -j $PROCESSES
|
||||
fi
|
||||
}
|
||||
|
||||
get_os_dependent_option() #(for_mac_os, for_linux)
|
||||
{
|
||||
if [ "$(uname -s)" == "Darwin" ]; then
|
||||
return $($1)
|
||||
else
|
||||
return $($2)
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
check_private_h
|
||||
set_platform_dependent_options
|
||||
echo $PROCESSES
|
||||
|
||||
[ -n "$OPT_DEBUG" ] && build_conf Debug
|
||||
[ -n "$OPT_RELEASE" ] && build_conf Release
|
||||
|
||||
exit 0
|
Loading…
Add table
Reference in a new issue