2022-07-14 01:30:11 +08:00
|
|
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
2022-10-01 05:52:19 +08:00
|
|
|
index b87af66..10ec58f 100644
|
2022-07-14 01:30:11 +08:00
|
|
|
--- a/src/CMakeLists.txt
|
|
|
|
+++ b/src/CMakeLists.txt
|
2022-10-01 05:52:19 +08:00
|
|
|
@@ -87,9 +87,26 @@ if(UNIX AND NOT APPLE)
|
|
|
|
target_link_libraries (hpdf ${M_LIB})
|
2022-07-14 01:30:11 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
+if(LIBHPDF_SHARED)
|
2022-10-01 05:52:19 +08:00
|
|
|
+ if(WIN32 AND NOT CYGWIN)
|
|
|
|
+ set_target_properties(hpdf PROPERTIES DEFINE_SYMBOL HPDF_DLL_MAKE)
|
|
|
|
+ endif()
|
|
|
|
+endif()
|
2022-07-14 01:30:11 +08:00
|
|
|
+
|
2022-10-01 05:52:19 +08:00
|
|
|
+target_include_directories(hpdf PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>)
|
|
|
|
+
|
|
|
|
+add_library(haru INTERFACE)
|
|
|
|
+set_property(TARGET haru APPEND PROPERTY INTERFACE_LINK_LIBRARIES hpdf)
|
2022-07-14 01:30:11 +08:00
|
|
|
+
|
|
|
|
install(
|
2022-10-01 05:52:19 +08:00
|
|
|
- TARGETS hpdf
|
|
|
|
+ TARGETS hpdf haru
|
2022-07-14 01:30:11 +08:00
|
|
|
+ EXPORT unofficial-libharu-config
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
)
|
|
|
|
+
|
|
|
|
+install(EXPORT unofficial-libharu-config
|
2022-10-01 05:52:19 +08:00
|
|
|
+ NAMESPACE unofficial::libharu::
|
|
|
|
+ DESTINATION share/unofficial-libharu
|
2022-07-14 01:30:11 +08:00
|
|
|
+)
|