Skip to content

Commit

Permalink
prepare gpx support
Browse files Browse the repository at this point in the history
  • Loading branch information
Karry committed Aug 6, 2018
1 parent 50acdd4 commit 0ba0374
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
16 changes: 13 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ find_package( Qt5 ${QT_MIN_VERSION}
Svg
Qml
Quick
Sql
)
find_package(Qt5LinguistTools)
find_package(OpenMP REQUIRED)
Expand Down Expand Up @@ -87,11 +88,13 @@ PRINT_LIBRARY_STATUS("Qt5" "http://www.qtsoftware.com"
#PRINT_LIBRARY_STATUS("libprotobuf" "https://github.com/google/protobuf" "" PROTOBUF_FOUND)
PRINT_LIBRARY_STATUS("OpenMP compiler support" "http://openmp.org/wp/openmp-compilers/" "" OPENMP_FOUND)
PRINT_LIBRARY_STATUS("SailfishApp library" "https://github.com/sailfish-sdk/libsailfishapp" "" LIBSAILFISHAPP_FOUND)
PRINT_LIBRARY_STATUS("Xml2 library" "http://xmlsoft.org/" "" LIBXML2_FOUND)

message(STATUS "")

if(Qt5_FOUND AND
LIBSAILFISHAPP_FOUND
LIBSAILFISHAPP_FOUND AND
LIBXML2_FOUND
)
message(STATUS " OSMScout-Sailfish can be compiled........ YES")
set(OSMSCOUT_SAILFISH_CAN_BE_COMPILED true)
Expand Down Expand Up @@ -199,11 +202,16 @@ set(MARISA_LIBRARIES marisa)

set(OSMSCOUT_BASE_DIR_BUILD ${CMAKE_CURRENT_BINARY_DIR})
set(OSMSCOUT_BASE_DIR_SOURCE ${CMAKE_HOME_DIRECTORY}/dependencies/libosmscout)
set(OSMSCOUT_BASE_DIR_BUILD ${CMAKE_CURRENT_BINARY_DIR}/dependencies/libosmscout)

set(OSMSCOUT_INCLUDE_DIRS
${OSMSCOUT_BASE_DIR_SOURCE}/libosmscout/include
${OSMSCOUT_BASE_DIR_SOURCE}/libosmscout-map/include
${OSMSCOUT_BASE_DIR_SOURCE}/libosmscout-map-qt/include

${OSMSCOUT_BASE_DIR_SOURCE}/libosmscout-gpx/include
${OSMSCOUT_BASE_DIR_BUILD}/libosmscout-gpx/include

${OSMSCOUT_BASE_DIR_SOURCE}/libosmscout-client-qt/include
)

Expand All @@ -216,6 +224,7 @@ add_definitions(${Qt5Core_DEFINITIONS})
add_subdirectory(dependencies/libosmscout/libosmscout)
add_subdirectory(dependencies/libosmscout/libosmscout-map)
add_subdirectory(dependencies/libosmscout/libosmscout-map-qt)
add_subdirectory(dependencies/libosmscout/libosmscout-gpx)
add_subdirectory(dependencies/libosmscout/libosmscout-client-qt)

# ==================================================================================================
Expand Down Expand Up @@ -268,7 +277,7 @@ set(SOURCE_FILES
qml/main.qml
qml/l10n.qml
qml/desktop.qml
)
)

# XML files with translated phrases.
# You can add new language translation just by adding new entry here, and run build.
Expand Down Expand Up @@ -332,11 +341,12 @@ target_link_libraries(harbour-osmscout
Qt5::Quick
Qt5::Svg
Qt5::Positioning

marisa
OSMScout
OSMScoutMap
OSMScoutMapQt
OSMScoutGPX
OSMScoutClientQt
${LIBSAILFISHAPP_LIBRARIES}
)
Expand Down
17 changes: 11 additions & 6 deletions CMakeMod/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,11 @@ check_function_exists(mmap HAVE_MMAP)
check_function_exists(posix_fadvise HAVE_POSIX_FADVISE)
check_function_exists(posix_madvise HAVE_POSIX_MADVISE)

# prepare cmake variables for configuration files
set(OSMSCOUT_HAVE_INT16_T ${HAVE_INT16_T})
set(OSMSCOUT_HAVE_INT32_T ${HAVE_INT32_T})
set(OSMSCOUT_HAVE_INT64_T ${HAVE_INT64_T})
set(OSMSCOUT_HAVE_INT8_T ${HAVE_INT8_T})
set(OSMSCOUT_HAVE_SSE2 ${HAVE_SSE2})

# check libraries and tools

find_package(LibXml2)

find_package(iconv QUIET)
if(ICONV_FOUND)
set(HAVE_ICONV TRUE)
Expand All @@ -113,6 +110,14 @@ else()
message(WARNING "No iconv support")
endif()

# prepare cmake variables for configuration files
set(OSMSCOUT_HAVE_INT16_T ${HAVE_INT16_T})
set(OSMSCOUT_HAVE_INT32_T ${HAVE_INT32_T})
set(OSMSCOUT_HAVE_INT64_T ${HAVE_INT64_T})
set(OSMSCOUT_HAVE_INT8_T ${HAVE_INT8_T})
set(OSMSCOUT_HAVE_SSE2 ${HAVE_SSE2})
set(OSMSCOUT_GPX_HAVE_LIB_XML ${LIBXML2_FOUND})

function(create_private_config output name)
string(REPLACE "-" "_" OSMSCOUT_PRIVATE_CONFIG_HEADER_NAME ${name})
string(TOUPPER ${OSMSCOUT_PRIVATE_CONFIG_HEADER_NAME} OSMSCOUT_PRIVATE_CONFIG_HEADER_NAME)
Expand Down
2 changes: 2 additions & 0 deletions rpm/harbour-osmscout.spec
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ Source100: harbour-osmscout.yaml
Requires: sailfishsilica-qt5 >= 0.10.9
Requires: qt5-qtpositioning >= 5.2.0
Requires: qt5-qtdeclarative-import-positioning >= 5.2.0
Requires: libxml2 >= 2.9.1
BuildRequires: pkgconfig(sailfishapp) >= 1.0.2
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5Positioning)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: libxml2-devel
BuildRequires: cmake
BuildRequires: chrpath
BuildRequires: desktop-file-utils
Expand Down
3 changes: 3 additions & 0 deletions rpm/harbour-osmscout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Builder: none
PkgBR:
- cmake
- chrpath
- libxml2-devel

# This section specifies build dependencies that are resolved using pkgconfig.
PkgConfigBR:
- sailfishapp >= 1.0.2
Expand All @@ -35,6 +37,7 @@ Requires:
- sailfishsilica-qt5 >= 0.10.9
- qt5-qtpositioning >= 5.2.0
- qt5-qtdeclarative-import-positioning >= 5.2.0
- libxml2 >= 2.9.1

# All installed files
Files:
Expand Down

0 comments on commit 0ba0374

Please sign in to comment.