diff --git a/CMakeLists.txt b/CMakeLists.txt index a6fa1268..21ee66fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,8 +62,8 @@ macro(qsk_setup_build) endmacro() macro(qsk_setup_install) - # we have to provide and install a QSkinnyConfig.cmake - # TODO ... + set(QSK_INSTALL_HEADERS include) + set(QSK_INSTALL_LIBS lib) endmacro() ############################################################################ @@ -123,7 +123,7 @@ endif() set(PACKAGE_NAME ${PROJECT_NAME}) set(PACKAGE_VERSION ${CMAKE_PROJECT_VERSION}) set(PACKAGE_NAMESPACE Qsk) -set(PACKAGE_LOCATION lib/cmake/${PROJECT_NAME}) +set(PACKAGE_LOCATION ${QSK_INSTALL_LIBS}/cmake/${PROJECT_NAME}) install(TARGETS qskinny EXPORT ${PACKAGE_NAME}Targets LIBRARY DESTINATION ${QSK_INSTALL_LIBS} diff --git a/examples/iotdashboard_smoketest/.gitignore b/examples/iotdashboard_smoketest/.gitignore new file mode 100644 index 00000000..09a75fee --- /dev/null +++ b/examples/iotdashboard_smoketest/.gitignore @@ -0,0 +1,2 @@ +build +iotdashboard \ No newline at end of file diff --git a/examples/iotdashboard_smoketest/CMakeLists.txt b/examples/iotdashboard_smoketest/CMakeLists.txt index 2ee64519..ea34d940 100644 --- a/examples/iotdashboard_smoketest/CMakeLists.txt +++ b/examples/iotdashboard_smoketest/CMakeLists.txt @@ -2,23 +2,46 @@ cmake_minimum_required(VERSION 3.18) project(iotdashboard_smoketest) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC OFF) +set(CMAKE_GLOBAL_AUTOGEN_TARGET OFF) + find_package(QSkinny REQUIRED) +# TODO we don't delivery the qsk macros +function(qsk_add_executable target) + if(QT_VERSION_MAJOR VERSION_GREATER_EQUAL 6) + qt6_add_executable(${ARGV}) + else() + add_executable(${ARGV}) + endif() +endfunction() + +# TODO we don't delivery the qsk macros +function(qsk_add_example target) + cmake_parse_arguments(PARSE_ARGV 1 arg "MANUAL_FINALIZATION" "" "") + add_executable(${target} WIN32 MACOSX_BUNDLE ${arg_UNPARSED_ARGUMENTS} ) + target_link_libraries(${target} PRIVATE Qsk::qskinny ) + target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_LIST_DIR}) +endfunction() + find_package(Qt6 COMPONENTS Core QUIET) if (NOT Qt6_FOUND) find_package(Qt5 5.15 REQUIRED COMPONENTS Core Gui OpenGL Quick Svg Widgets) find_package(Qt5 5.15 OPTIONAL_COMPONENTS QuickWidgets WebEngine WebEngineCore) - message(WARNING "using QSkinny's 'qt_add_executable()'") + function(qt_add_executable) add_executable(${ARGV}) endfunction(qt_add_executable) - message(WARNING "using QSkinny's 'qt_add_library()'") - function(qt_add_library) - add_library(${ARGV}) - endfunction(qt_add_library) else() find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL Quick QuickWidgets Svg Widgets) find_package(Qt6 OPTIONAL_COMPONENTS QuickWidgets WebEngineCore WebEngineQuick) endif() -add_subdirectory(../iotdashboard ${CMAKE_CURRENT_BINARY_DIR}/../iotdashboard) \ No newline at end of file +add_subdirectory(../iotdashboard ${CMAKE_CURRENT_BINARY_DIR}/../iotdashboard) + +# TODO we don't delivery the support library +get_target_property(iotdashboard_COMPILE_DEFINITIONS iotdashboard COMPILE_DEFINITIONS) +list(FILTER iotdashboard_COMPILE_DEFINITIONS EXCLUDE REGEX [[^USE_SHORTCUTS=1$]]) +set_property(TARGET iotdashboard PROPERTY COMPILE_DEFINITIONS ${iotdashboard_COMPILE_DEFINITIONS}) \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d4f0b076..43feec2c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -483,6 +483,10 @@ target_include_directories(${target} PUBLIC $ $) +target_include_directories(${target} + INTERFACE + $) + target_link_libraries(${target} PUBLIC Qt::Core Qt::CorePrivate Qt::Quick Qt::QuickPrivate)