Advertisement
vladislav_larionov

Untitled

Jun 13th, 2024
765
0
38 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 1.04 KB | None | 0 0
  1. cmake_minimum_required(VERSION 3.15)
  2. project(PackageTest CXX)
  3.  
  4. find_package(mfw-offline-routing CONFIG REQUIRED)
  5.  
  6. find_package (Qt5 COMPONENTS Core Network Qml Gui Quick LinguistTools REQUIRED)
  7.  
  8. include(FindPkgConfig)
  9. pkg_search_module(AURORA auroraapp REQUIRED)
  10. pkg_search_module(AURORA auroraapp_i18n REQUIRED)
  11.  
  12. set(CMAKE_AUTOMOC ON)
  13. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  14.  
  15. add_executable(example src/example.cpp)
  16. target_link_libraries(example mfw-offline-routing::mfw-offline-routing)
  17.  
  18. target_compile_definitions(example PRIVATE
  19.     $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>
  20. )
  21. target_include_directories(example PRIVATE
  22.     $<BUILD_INTERFACE:
  23.     ${AURORA_INCLUDE_DIRS}
  24. >)
  25. target_link_libraries(example
  26.     Qt5::Quick
  27.     ${AURORA_LDFLAGS}
  28. )
  29.  
  30. target_compile_definitions(example PRIVATE MFW_PATH="${mfw_package_path}")
  31. message("-- mfw-offline-routing package path = ${mfw_package_path}")
  32.  
  33. file(WRITE "${CMAKE_BINARY_DIR}/QtCreatorDeployment.txt"
  34.     "${CMAKE_INSTALL_PREFIX}
  35. ${CMAKE_BINARY_DIR}/example:bin
  36. ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement