From bf252a8c371be99aba9c97e4919cf3f3cdaef50f Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Tue, 24 Sep 2019 01:26:11 +0200 Subject: [PATCH] Allow for including util.h in deployers --- src/CMakeLists.txt | 8 ++++++-- src/deployers/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e5e5dd9..201a827 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,9 @@ -add_executable(linuxdeploy-plugin-qt main.cpp qt-modules.h qml.cpp qml.h util.cpp util.h deployment.h) -target_link_libraries(linuxdeploy-plugin-qt linuxdeploy_core args json) +add_library(linuxdeploy-plugin-qt_util OBJECT util.cpp util.h) +target_include_directories(linuxdeploy-plugin-qt_util PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(linuxdeploy-plugin-qt_util linuxdeploy_core args) + +add_executable(linuxdeploy-plugin-qt main.cpp qt-modules.h qml.cpp qml.h deployment.h) +target_link_libraries(linuxdeploy-plugin-qt linuxdeploy_core args json linuxdeploy-plugin-qt_util) set_target_properties(linuxdeploy-plugin-qt PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") add_subdirectory(deployers) diff --git a/src/deployers/CMakeLists.txt b/src/deployers/CMakeLists.txt index 0f9fa86..35e0252 100644 --- a/src/deployers/CMakeLists.txt +++ b/src/deployers/CMakeLists.txt @@ -11,7 +11,7 @@ set(CLASSES add_library(deployers OBJECT) -target_link_libraries(deployers PUBLIC linuxdeploy_core) +target_link_libraries(deployers PUBLIC linuxdeploy_core linuxdeploy-plugin-qt_util) foreach(class ${CLASSES}) target_sources(deployers PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/${class}.h)