summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2022-12-04 02:42:15 +0100
committerAlbert Astals Cid <aacid@kde.org>2022-12-04 02:49:58 +0100
commit77d1660d6b6777a434a4c09f6c781999ab7ce0a8 (patch)
tree6d8fd01379b717df41f938431ff6e3670d903aad
parentb1fe3a03c0bfdc4df6d8dd5d128b928d3cb2ea89 (diff)
cmake: include dirs via target_include_directories
instead of include_directories
-rw-r--r--CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42dad3ea..d054a23c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -535,15 +535,12 @@ if (OpenJPEG_FOUND)
poppler/JPEG2000Stream.cc
)
set(poppler_LIBS ${poppler_LIBS} openjp2)
- # target openjp2 may lack interface include directories
- include_directories(SYSTEM ${OPENJPEG_INCLUDE_DIRS})
else ()
set(poppler_SRCS ${poppler_SRCS}
poppler/JPXStream.cc
)
endif()
if(USE_CMS)
- include_directories(SYSTEM ${LCMS2_INCLUDE_DIR})
set(poppler_LIBS ${poppler_LIBS} ${LCMS2_LIBRARIES})
endif()
if(WIN32)
@@ -603,6 +600,14 @@ if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
add_library(poppler ${poppler_SRCS})
+if (OpenJPEG_FOUND)
+ # check if we can remove this when we depend on newer openjpeg versions, 2.5 seems fixed
+ # target openjp2 may lack interface include directories
+ target_include_directories(poppler SYSTEM PRIVATE ${OPENJPEG_INCLUDE_DIRS})
+endif()
+if(USE_CMS)
+ target_include_directories(poppler SYSTEM PRIVATE ${LCMS2_INCLUDE_DIR})
+endif()
generate_export_header(poppler BASE_NAME poppler-private EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/poppler_private_export.h")
set_target_properties(poppler PROPERTIES VERSION 126.0.0 SOVERSION 126)
if(MINGW AND BUILD_SHARED_LIBS)