Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pkgconfig files #27

Merged
merged 1 commit into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}