freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master c80620c 5/6: * CMakeLists.txt: Create `freetype-confi


From: Werner LEMBERG
Subject: [freetype2] master c80620c 5/6: * CMakeLists.txt: Create `freetype-config.cmake' config module.
Date: Fri, 27 Nov 2015 22:17:01 +0000

branch: master
commit c80620c7fe1c11a4a6080cdec10c09ccd6a4edda
Author: Tamas Kenez <address@hidden>
Commit: Werner Lemberg <address@hidden>

    * CMakeLists.txt: Create `freetype-config.cmake' config module.
---
 CMakeLists.txt |   23 +++++++++++++++++++----
 ChangeLog      |    4 ++++
 2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e925df..8efa08b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -351,22 +351,32 @@ if (BUILD_FRAMEWORK)
   )
 endif ()
 
+if (NOT CMAKE_VERSION VERSION_LESS 2.8.11)
+  target_include_directories(freetype
+    PUBLIC $<INSTALL_INTERFACE:include/freetype2>)
+endif ()
+
+if (CMAKE_VERSION VERSION_LESS 2.8.12)
+  set(MAYBE_PRIVATE "")
+else ()
+  set(MAYBE_PRIVATE "PRIVATE")
+endif ()
 
 if (ZLIB_FOUND)
-  target_link_libraries(freetype ${ZLIB_LIBRARIES})
+  target_link_libraries(freetype ${MAYBE_PRIVATE} ${ZLIB_LIBRARIES})
   include_directories(${ZLIB_INCLUDE_DIRS})
 endif ()
 if (BZIP2_FOUND)
-  target_link_libraries(freetype ${BZIP2_LIBRARIES})
+  target_link_libraries(freetype ${MAYBE_PRIVATE} ${BZIP2_LIBRARIES})
   include_directories(${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
 endif ()
 if (PNG_FOUND)
   add_definitions(${PNG_DEFINITIONS})
-  target_link_libraries(freetype ${PNG_LIBRARIES})
+  target_link_libraries(freetype ${MAYBE_PRIVATE} ${PNG_LIBRARIES})
   include_directories(${PNG_INCLUDE_DIRS})
 endif ()
 if (HARFBUZZ_FOUND)
-  target_link_libraries(freetype ${HARFBUZZ_LIBRARIES})
+  target_link_libraries(freetype ${MAYBE_PRIVATE} ${HARFBUZZ_LIBRARIES})
   include_directories(${HARFBUZZ_INCLUDE_DIRS})
 endif ()
 
@@ -385,11 +395,16 @@ install(FILES
   DESTINATION include/freetype2/freetype/config
 )
 install(TARGETS freetype
+  EXPORT freetype-targets
   RUNTIME DESTINATION bin
   LIBRARY DESTINATION lib
   ARCHIVE DESTINATION lib
   FRAMEWORK DESTINATION Library/Frameworks
 )
+install(EXPORT freetype-targets
+  DESTINATION lib/cmake/freetype
+  FILE freetype-config.cmake
+)
 
 
 # Packaging
diff --git a/ChangeLog b/ChangeLog
index fee798c..33c9637 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-11-27  Tamas Kenez  <address@hidden>
 
+       * CMakeLists.txt: Create `freetype-config.cmake' config module.
+
+2015-11-27  Tamas Kenez  <address@hidden>
+
        * CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
 
 2015-11-27  Tamas Kenez  <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]