2022-06-21 05:20:21 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2023-05-26 06:33:51 +08:00
|
|
|
index 597847b..da988ce 100644
|
2022-06-21 05:20:21 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2023-05-26 06:33:51 +08:00
|
|
|
@@ -258,11 +258,6 @@ endif()
|
2022-06-28 05:03:59 +08:00
|
|
|
# To use these dependencies set PODOFO_DIR to the podofo BUILD directory in
|
|
|
|
# your build (eg -DPODOFO_DIR=/path/to/podofo when running cmake to configure
|
2023-05-26 06:33:51 +08:00
|
|
|
# the app that'll use podofo). See: find_package(...) in the cmake docs.
|
|
|
|
-if(PODOFO_BUILD_SHARED)
|
|
|
|
- export(TARGETS podofo_shared FILE "${PROJECT_BINARY_DIR}/podofoConfig.cmake")
|
|
|
|
-else()
|
|
|
|
- export(TARGETS podofo_static podofo_private FILE "${PROJECT_BINARY_DIR}/podofoConfig.cmake")
|
|
|
|
-endif()
|
2022-06-28 05:03:59 +08:00
|
|
|
|
2023-05-26 06:33:51 +08:00
|
|
|
# Enable packaging
|
|
|
|
set(CPACK_PACKAGE_DESCRIPTION "A C++ PDF manipulation library")
|
2022-06-28 05:03:59 +08:00
|
|
|
diff --git a/src/podofo/CMakeLists.txt b/src/podofo/CMakeLists.txt
|
2023-05-26 06:33:51 +08:00
|
|
|
index 3a148fb..4ca1420 100644
|
2022-06-28 05:03:59 +08:00
|
|
|
--- a/src/podofo/CMakeLists.txt
|
|
|
|
+++ b/src/podofo/CMakeLists.txt
|
2023-05-26 06:33:51 +08:00
|
|
|
@@ -77,11 +77,15 @@ if(PODOFO_BUILD_STATIC)
|
|
|
|
CLEAN_DIRECT_OUTPUT 1
|
|
|
|
OUTPUT_NAME "podofo"
|
|
|
|
)
|
|
|
|
- install(TARGETS podofo_static
|
|
|
|
+ install(TARGETS podofo_static podofo_private
|
|
|
|
+ EXPORT podofo-config
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
)
|
|
|
|
+ install(EXPORT podofo-config
|
2022-06-28 05:03:59 +08:00
|
|
|
+ DESTINATION share/podofo
|
2023-05-26 06:33:51 +08:00
|
|
|
+ )
|
|
|
|
set(PODOFO_LIBRARIES podofo_static podofo_private
|
|
|
|
CACHE INTERNAL "Which podofo library variant to depend on")
|
|
|
|
endif()
|
|
|
|
@@ -102,10 +106,14 @@ if(PODOFO_BUILD_SHARED)
|
|
|
|
# Since we're building a shared podofo, prefer to depend on this one for
|
|
|
|
# tests and tools over the static library (if built).
|
|
|
|
install(TARGETS podofo_shared
|
|
|
|
+ EXPORT podofo-config
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
)
|
|
|
|
+ install(EXPORT podofo-config
|
2022-06-28 05:03:59 +08:00
|
|
|
+ DESTINATION share/podofo
|
2023-05-26 06:33:51 +08:00
|
|
|
+ )
|
2022-06-28 05:03:59 +08:00
|
|
|
|
2023-05-26 06:33:51 +08:00
|
|
|
# Create a pkg-config file for linking against shared library
|
|
|
|
# if pkg-config is available on the system.
|