Compare commits
No commits in common. "baa2ed1e179f43e70e86f67be1dbfbf0dab0b354" and "195a4ef30d219a0844283789c98d7a1c9b09c37a" have entirely different histories.
baa2ed1e17
...
195a4ef30d
|
@ -40,12 +40,6 @@ jobs:
|
|||
cmake -B build/ ${{ matrix.cmake }} -DQTK_UPDATE_SUBMODULES=ON
|
||||
cmake --build build/
|
||||
|
||||
- name: OSX Stuff
|
||||
if: matrix.os == 'macos-lates'
|
||||
shell: bash
|
||||
run: |
|
||||
ls build/
|
||||
|
||||
- name: Package Qtk
|
||||
shell: bash
|
||||
run: |
|
||||
|
|
|
@ -24,8 +24,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
if(MSVC)
|
||||
add_compile_options(/WX:NO /wd4131 /wd4127)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
add_compile_options(/wd4131 /wd4127)
|
||||
endif()
|
||||
|
||||
################################################################################
|
||||
|
@ -84,7 +84,6 @@ if (QTK_PREFIX_QTCREATOR)
|
|||
endif()
|
||||
message(STATUS "[Qtk] CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}")
|
||||
set(QTK_RESOURCES "${CMAKE_SOURCE_DIR}/resources")
|
||||
set(QTK_OSX_ICONS ${CMAKE_SOURCE_DIR}/resources/icons/osx/kilroy.icns)
|
||||
|
||||
# Print all QTK options and their values.
|
||||
get_cmake_property(VAR_NAMES VARIABLES)
|
||||
|
|
|
@ -29,7 +29,7 @@ install(
|
|||
DESTINATION lib/cmake/Qtk
|
||||
)
|
||||
install(
|
||||
EXPORT qtk_export
|
||||
EXPORT qtk-export
|
||||
FILE QtkTargets.cmake
|
||||
NAMESPACE Qtk::
|
||||
DESTINATION lib/cmake/Qtk
|
||||
|
@ -43,11 +43,6 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Qt OpenGL 3D graphics library.")
|
|||
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/shaunrd0/qtk")
|
||||
set(CPACK_SOURCE_IGNORE_FILES build;install;\.git;\.github;\.idea)
|
||||
set(CPACK_PACKAGE_DIRECTORY packages/)
|
||||
|
||||
# OSX
|
||||
set(CPACK_BUNDLE_NAME Qtk)
|
||||
set(CPACK_BUNDLE_PLIST ${CMAKE_BINARY_DIR}/Info.plist)
|
||||
set(CPACK_BUNDLE_ICON ${QTK_OSX_ICONS})
|
||||
if(WIN32)
|
||||
set(CPACK_SOURCE_GENERATOR ZIP)
|
||||
else()
|
||||
|
|
|
@ -23,16 +23,16 @@ set(
|
|||
toolbox.h
|
||||
treeview.h
|
||||
)
|
||||
qt_add_library(qtk_plugin_library STATIC)
|
||||
qt_add_library(qtk-plugin-library STATIC)
|
||||
target_sources(
|
||||
qtk_plugin_library PRIVATE
|
||||
qtk-plugin-library PRIVATE
|
||||
"${QTK_PLUGIN_LIBRARY_SOURCES}"
|
||||
"${QTK_PLUGIN_LIBRARY_HEADERS}"
|
||||
)
|
||||
target_link_libraries(qtk_plugin_library PUBLIC Qt6::UiPlugin qtk_library)
|
||||
target_link_libraries(qtk-plugin-library PUBLIC Qt6::UiPlugin qtk-library)
|
||||
|
||||
install(
|
||||
TARGETS qtk_plugin_library
|
||||
TARGETS qtk-plugin-library
|
||||
BUNDLE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib/static
|
||||
|
@ -40,7 +40,7 @@ install(
|
|||
)
|
||||
|
||||
install(
|
||||
TARGETS qtk_plugin_library
|
||||
TARGETS qtk-plugin-library
|
||||
BUNDLE DESTINATION "${QTK_PLUGIN_LIBRARY_DIR}"
|
||||
LIBRARY DESTINATION "${QTK_PLUGIN_LIBRARY_DIR}"
|
||||
RUNTIME DESTINATION "${QTK_PLUGIN_LIBRARY_DIR}"
|
||||
|
@ -57,7 +57,7 @@ target_sources(
|
|||
widgetplugincollection.cpp widgetplugincollection.h
|
||||
widgetplugin.cpp widgetplugin.h
|
||||
)
|
||||
target_link_libraries(qtk_collection PUBLIC qtk_plugin_library)
|
||||
target_link_libraries(qtk_collection PUBLIC qtk-plugin-library)
|
||||
|
||||
install(
|
||||
TARGETS qtk_collection
|
||||
|
@ -84,31 +84,26 @@ configure_file(
|
|||
@ONLY
|
||||
)
|
||||
|
||||
qt_add_executable(qtk_main ${QTK_APP_SOURCES})
|
||||
target_link_libraries(qtk_main PRIVATE qtk_plugin_library)
|
||||
qt_add_executable(qtk-main ${QTK_APP_SOURCES})
|
||||
target_link_libraries(qtk-main PRIVATE qtk-plugin-library)
|
||||
|
||||
set_target_properties(
|
||||
qtk_main PROPERTIES
|
||||
qtk-main PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_BUNDLE_NAME Qtk
|
||||
MACOSX_BUNDLE_ICON_FILE ${QTK_OSX_ICONS}
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER ${CMAKE_PROJECT_NAME}
|
||||
MACOSX_BUNDLE_INFO_STRING ${CMAKE_PROJECT_DESCRIPTION}
|
||||
MACOSX_BUNDLE_COPYRIGHT "All Content (c) 2023 Shaun Reed, all rights reserved"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS qtk_main
|
||||
TARGETS qtk-main
|
||||
BUNDLE DESTINATION bin
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION bin/lib
|
||||
)
|
||||
|
||||
qt_generate_deploy_app_script(
|
||||
TARGET qtk_main
|
||||
TARGET qtk-main
|
||||
FILENAME_VARIABLE QTK_DEPLOY_SCRIPT
|
||||
NO_UNSUPPORTED_PLATFORM_ERROR
|
||||
)
|
||||
|
@ -126,16 +121,16 @@ if(WIN32)
|
|||
|
||||
if(TARGET Qt6::windeployqt)
|
||||
add_custom_command(
|
||||
TARGET qtk_main
|
||||
TARGET qtk-main
|
||||
POST_BUILD
|
||||
COMMAND set PATH=%PATH%$<SEMICOLON>${qt6_install_prefix}
|
||||
COMMAND Qt6::windeployqt --dir "${CMAKE_BINARY_DIR}/windeployqt" "$<TARGET_FILE_DIR:qtk_main>/$<TARGET_FILE_NAME:qtk_main>"
|
||||
COMMAND Qt6::windeployqt --dir "${CMAKE_BINARY_DIR}/windeployqt" "$<TARGET_FILE_DIR:qtk-main>/$<TARGET_FILE_NAME:qtk-main>"
|
||||
)
|
||||
install(DIRECTORY "${CMAKE_BINARY_DIR}/windeployqt/" DESTINATION bin)
|
||||
endif()
|
||||
|
||||
if(MSVC AND TARGET Qt6::qmake)
|
||||
set(VSUSER_FILE "${CMAKE_CURRENT_BINARY_DIR}/qtk_main.vcxproj.user")
|
||||
set(VSUSER_FILE "${CMAKE_CURRENT_BINARY_DIR}/qtk-main.vcxproj.user")
|
||||
file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/extern/assimp/assimp/bin" assimp_bin)
|
||||
file(WRITE ${VSUSER_FILE} "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
|
||||
file(APPEND ${VSUSER_FILE} "<Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n")
|
||||
|
|
|
@ -44,46 +44,46 @@ set(
|
|||
)
|
||||
|
||||
qt6_add_big_resources(QTK_LIBRARY_SOURCES "${QTK_RESOURCES}/resources.qrc")
|
||||
qt_add_library(qtk_library STATIC)
|
||||
target_sources(qtk_library PRIVATE ${QTK_LIBRARY_SOURCES})
|
||||
qt_add_library(qtk-library STATIC)
|
||||
target_sources(qtk-library PRIVATE ${QTK_LIBRARY_SOURCES})
|
||||
target_sources(
|
||||
qtk_library PUBLIC
|
||||
qtk-library PUBLIC
|
||||
FILE_SET HEADERS
|
||||
BASE_DIRS "${CMAKE_SOURCE_DIR}/src"
|
||||
FILES ${QTK_LIBRARY_PUBLIC_HEADERS}
|
||||
)
|
||||
|
||||
if(QTK_DEBUG)
|
||||
target_compile_definitions(qtk_library PUBLIC QTK_DEBUG)
|
||||
target_compile_definitions(qtk-library PUBLIC QTK_DEBUG)
|
||||
endif()
|
||||
|
||||
set_target_properties(
|
||||
qtk_library PROPERTIES
|
||||
qtk-library PROPERTIES
|
||||
WIN32_EXECUTABLE TRUE
|
||||
MACOSX_BUNDLE TRUE
|
||||
VERSION ${PROJECT_VERSION}
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
qtk_library PUBLIC
|
||||
qtk-library PUBLIC
|
||||
Qt6::Core Qt6::OpenGLWidgets Qt6::Widgets
|
||||
)
|
||||
|
||||
if(QTK_UPDATE_SUBMODULES OR NOT ASSIMP_NEW_INTERFACE)
|
||||
target_link_libraries(qtk_library PUBLIC assimp)
|
||||
target_link_libraries(qtk-library PUBLIC assimp)
|
||||
elseif(ASSIMP_NEW_INTERFACE)
|
||||
target_link_libraries(qtk_library PUBLIC assimp::assimp)
|
||||
target_link_libraries(qtk-library PUBLIC assimp::assimp)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(qtk_library PUBLIC OpenGL::GL)
|
||||
target_link_libraries(qtk-library PUBLIC OpenGL::GL)
|
||||
endif()
|
||||
|
||||
# System install for qtk_library
|
||||
# System install for qtk-library
|
||||
install(
|
||||
TARGETS qtk_library
|
||||
# Associate qtk_library target with qtk-export
|
||||
EXPORT qtk_export
|
||||
TARGETS qtk-library
|
||||
# Associate qtk-library target with qtk-export
|
||||
EXPORT qtk-export
|
||||
FILE_SET HEADERS DESTINATION include
|
||||
BUNDLE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
|
@ -92,9 +92,9 @@ install(
|
|||
INCLUDES DESTINATION include
|
||||
)
|
||||
|
||||
## Install qtk_library to Qt Designer to support widget plugins.
|
||||
## Install qtk-library to Qt Designer to support widget plugins.
|
||||
install(
|
||||
TARGETS qtk_library
|
||||
TARGETS qtk-library
|
||||
BUNDLE DESTINATION "${QTK_PLUGIN_LIBRARY_DIR}"
|
||||
LIBRARY DESTINATION "${QTK_PLUGIN_LIBRARY_DIR}"
|
||||
ARCHIVE DESTINATION "${QTK_PLUGIN_LIBRARY_DIR}"
|
||||
|
|
Loading…
Reference in New Issue