Skip to content

Commit

Permalink
Add pkgconfig files
Browse files Browse the repository at this point in the history
  • Loading branch information
buschmann23 committed Nov 11, 2023
1 parent cb3dc07 commit 67ed9ee
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
8 changes: 8 additions & 0 deletions templates/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
12 changes: 12 additions & 0 deletions templates/lib/CuteleeQtTemplates.pc.in
Original file line number Diff line number Diff line change
@@ -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}

8 changes: 8 additions & 0 deletions textdocument/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
12 changes: 12 additions & 0 deletions textdocument/lib/CuteleeQtTextDocument.pc.in
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 67ed9ee

Please sign in to comment.