Merge pull request #85 from jagerman/pkgconfig-older-cmake-fix
Old cmake compatibility
This commit is contained in:
commit
c2858fe08d
|
@ -33,15 +33,17 @@ if(BUILD_STATIC_DEPS)
|
||||||
endif()
|
endif()
|
||||||
include(StaticBuild)
|
include(StaticBuild)
|
||||||
add_subdirectory(external/loki-mq)
|
add_subdirectory(external/loki-mq)
|
||||||
elseif(LOKIMQ_LIBRARIES) # Private option for the macos bundled gui build
|
|
||||||
add_library(lokimq INTERFACE)
|
|
||||||
target_link_libraries(lokimq INTERFACE ${LOKIMQ_LIBRARIES})
|
|
||||||
target_include_directories(lokimq INTERFACE ${LOKIMQ_INCLUDE_DIRS})
|
|
||||||
add_library(lokimq::lokimq ALIAS lokimq)
|
|
||||||
else()
|
else()
|
||||||
find_package(PkgConfig REQUIRED)
|
add_library(lokimq INTERFACE)
|
||||||
pkg_check_modules(lokimq REQUIRED liblokimq>=1.2.2 IMPORTED_TARGET)
|
if(LOKIMQ_LIBRARIES) # Private option for the macos bundled gui build
|
||||||
add_library(lokimq::lokimq ALIAS PkgConfig::lokimq)
|
target_link_libraries(lokimq INTERFACE ${LOKIMQ_LIBRARIES})
|
||||||
|
target_include_directories(lokimq INTERFACE ${LOKIMQ_INCLUDE_DIRS})
|
||||||
|
else()
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(lokimq REQUIRED liblokimq>=1.2.2 IMPORTED_TARGET)
|
||||||
|
target_link_libraries(lokimq INTERFACE PkgConfig::lokimq)
|
||||||
|
endif()
|
||||||
|
add_library(lokimq::lokimq ALIAS lokimq)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Qml Quick Widgets Charts Svg REQUIRED)
|
find_package(Qt5 COMPONENTS Qml Quick Widgets Charts Svg REQUIRED)
|
||||||
|
|
Loading…
Reference in New Issue