Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required(VERSION 3.15)
- project(PackageTest CXX)
- find_package(mfw-offline-routing CONFIG REQUIRED)
- find_package (Qt5 COMPONENTS Core Network Qml Gui Quick LinguistTools REQUIRED)
- include(FindPkgConfig)
- pkg_search_module(AURORA auroraapp REQUIRED)
- pkg_search_module(AURORA auroraapp_i18n REQUIRED)
- set(CMAKE_AUTOMOC ON)
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
- add_executable(example src/example.cpp)
- target_link_libraries(example mfw-offline-routing::mfw-offline-routing)
- target_compile_definitions(example PRIVATE
- $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>
- )
- target_include_directories(example PRIVATE
- $<BUILD_INTERFACE:
- ${AURORA_INCLUDE_DIRS}
- >)
- target_link_libraries(example
- Qt5::Quick
- ${AURORA_LDFLAGS}
- )
- target_compile_definitions(example PRIVATE MFW_PATH="${mfw_package_path}")
- message("-- mfw-offline-routing package path = ${mfw_package_path}")
- file(WRITE "${CMAKE_BINARY_DIR}/QtCreatorDeployment.txt"
- "${CMAKE_INSTALL_PREFIX}
- ${CMAKE_BINARY_DIR}/example:bin
- ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement