Adds initial intermediate qt6 porting state

This commit is contained in:
torsten committed 2026-08-17 17:54:56 +02:00
1 parent 99136e9460
commit d176b5e0d7
11247 files changed
+1891537

No files matched your search

@@ -0,0 +1,61 @@
#
# CMake Script für ngltools
# $Id$
# $HeadURL$
# $Author$
#
SET(ngltools_SRCS
ngltools_bitset.h
ngltools_convert.cpp
ngltools_convert.h
ngltools_dtg.cpp
ngltools_dtg.h
ngltools_export.h
ngltools_filesystem.cpp
ngltools_filesystem.h
ngltools_helpevent.cpp
ngltools_helpevent.h
)
NGL_ADD_LIBRARY(ALL ngltools SHARED ${ngltools_SRCS})
NGL_TARGET_LINK_LIBRARIES(ngltools
PUBLIC
Qt5::Core
)
# Smoke test for ngltools DTG conversion utilities
IF(BUILD_TESTING)
find_package(Qt6 COMPONENTS Test Core QUIET)
if (Qt6_FOUND)
set(_QTTEST_TARGET Qt6::Test)
set(_QTCORE_TARGET Qt6::Core)
else()
find_package(Qt5 COMPONENTS Test Core REQUIRED)
set(_QTTEST_TARGET Qt5::Test)
set(_QTCORE_TARGET Qt5::Core)
endif()
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tests/NGLToolsQtSmokeTest.cpp)
if(TARGET ngltools)
add_executable(ngltools_qt_smoke tests/NGLToolsQtSmokeTest.cpp)
target_link_libraries(ngltools_qt_smoke PRIVATE ngltools ${_QTTEST_TARGET} ${_QTCORE_TARGET})
else()
# Build the smoke test as a standalone executable using the dtg implementation
# when the ngltools library target is not available in this configuration.
add_executable(ngltools_qt_smoke tests/NGLToolsQtSmokeTest.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ngltools_dtg.cpp)
target_include_directories(ngltools_qt_smoke PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(ngltools_qt_smoke PRIVATE ${_QTTEST_TARGET} ${_QTCORE_TARGET})
endif()
add_test(NAME NGLToolsQtSmoke COMMAND ngltools_qt_smoke)
endif()
ENDIF()
NGL_TARGET_COMPILE_DEFINITIONS(ngltools PUBLIC BUILD_BASE_PATH="${CMAKE_BINARY_DIR}")
NGL_TARGET_COMPILE_DEFINITIONS(ngltools PUBLIC INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")
NGL_TARGET_INCLUDE_DIRECTORIES(ngltools
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/../
)
NGL_INSTALL_TARGET(ngltools)