diff --git a/CMakeLists.txt b/CMakeLists.txt index b70c268..d67d41b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,8 +13,10 @@ endif() include(GNUInstallDirs) +set(QT_MINIMUM_VERSION 5.6.0) + find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) -find_package(Qt${QT_VERSION_MAJOR} 5.6.0 COMPONENTS Core REQUIRED) +find_package(Qt${QT_VERSION_MAJOR} ${QT_MINIMUM_VERSION} COMPONENTS Core REQUIRED) option(BUILD_SHARED_LIBS "Build in shared lib mode" ON) option( BUILD_TEMPLATES "Build the Cutelee template library" TRUE ) diff --git a/templates/lib/CMakeLists.txt b/templates/lib/CMakeLists.txt index 0cd30a5..0e39c06 100644 --- a/templates/lib/CMakeLists.txt +++ b/templates/lib/CMakeLists.txt @@ -161,3 +161,11 @@ install(TARGETS ${templates_target_name} EXPORT cutelee_targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Templates PUBLIC_HEADER DESTINATION include/cutelee${PROJECT_VERSION_MAJOR}-qt${QT_VERSION_MAJOR}/cutelee ) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CuteleeQtTemplates.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/CuteleeQt${QT_VERSION_MAJOR}Templates.pc + @ONLY +) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CuteleeQt${QT_VERSION_MAJOR}Templates.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) diff --git a/templates/lib/CuteleeQtTemplates.pc.in b/templates/lib/CuteleeQtTemplates.pc.in new file mode 100644 index 0000000..cc6c65d --- /dev/null +++ b/templates/lib/CuteleeQtTemplates.pc.in @@ -0,0 +1,12 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/include/cutelee@PROJECT_VERSION_MAJOR@-qt@QT_VERSION_MAJOR@ + +Name: Cutelee Qt@QT_VERSION_MAJOR@ Templates +Description: Cutelee template library +Version: @PROJECT_VERSION@ +Requires: Qt@QT_VERSION_MAJOR@Core >= @QT_MINIMUM_VERSION@ +Libs: -L${libdir} -lCuteleeQt@QT_VERSION_MAJOR@Templates +Cflags: -I${includedir}/cutelee -I${includedir} + diff --git a/textdocument/lib/CMakeLists.txt b/textdocument/lib/CMakeLists.txt index 256910a..736b966 100644 --- a/textdocument/lib/CMakeLists.txt +++ b/textdocument/lib/CMakeLists.txt @@ -67,3 +67,11 @@ install(TARGETS ${textdocs_target_name} EXPORT cutelee_targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT TextDocument PUBLIC_HEADER DESTINATION include/cutelee${PROJECT_VERSION_MAJOR}-qt${QT_VERSION_MAJOR}/cutelee ) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CuteleeQtTextDocument.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/CuteleeQt${QT_VERSION_MAJOR}TextDocument.pc + @ONLY +) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CuteleeQt${QT_VERSION_MAJOR}TextDocument.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) diff --git a/textdocument/lib/CuteleeQtTextDocument.pc.in b/textdocument/lib/CuteleeQtTextDocument.pc.in new file mode 100644 index 0000000..53c8d4b --- /dev/null +++ b/textdocument/lib/CuteleeQtTextDocument.pc.in @@ -0,0 +1,12 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/include/cutelee@PROJECT_VERSION_MAJOR@-qt@QT_VERSION_MAJOR@ + +Name: Cutelee Qt@QT_VERSION_MAJOR@ TextDocument +Description: Cutelee text document library +Version: @PROJECT_VERSION@ +Requires: Qt@QT_VERSION_MAJOR@Gui +Libs: -L${libdir} -lCuteleeQt@QT_VERSION_MAJOR@TextDocument +Cflags: -I${includedir}/cutelee -I${includedir} +