Skip to content

Commit

Permalink
add missing install variables
Browse files Browse the repository at this point in the history
  • Loading branch information
rick-vogel authored and uwerat committed Dec 21, 2023
1 parent 32eed71 commit e0bdf16
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

############################################################################
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions examples/iotdashboard_smoketest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
iotdashboard
35 changes: 29 additions & 6 deletions examples/iotdashboard_smoketest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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})
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,10 @@ target_include_directories(${target} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/layouts>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes>)

target_include_directories(${target}
INTERFACE
$<INSTALL_INTERFACE:${QSK_INSTALL_HEADERS}>)

target_link_libraries(${target}
PUBLIC Qt::Core Qt::CorePrivate Qt::Quick Qt::QuickPrivate)

Expand Down

0 comments on commit e0bdf16

Please sign in to comment.