forked from minhngoc25a/freetype2
* CMakeLists.txt: Create `freetype-config.cmake' config module.
This commit is contained in:
parent
9d0544f25f
commit
c80620c7fe
|
@ -351,22 +351,32 @@ if (BUILD_FRAMEWORK)
|
||||||
)
|
)
|
||||||
endif ()
|
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)
|
if (ZLIB_FOUND)
|
||||||
target_link_libraries(freetype ${ZLIB_LIBRARIES})
|
target_link_libraries(freetype ${MAYBE_PRIVATE} ${ZLIB_LIBRARIES})
|
||||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||||
endif ()
|
endif ()
|
||||||
if (BZIP2_FOUND)
|
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
|
include_directories(${BZIP2_INCLUDE_DIR}) # not BZIP2_INCLUDE_DIRS
|
||||||
endif ()
|
endif ()
|
||||||
if (PNG_FOUND)
|
if (PNG_FOUND)
|
||||||
add_definitions(${PNG_DEFINITIONS})
|
add_definitions(${PNG_DEFINITIONS})
|
||||||
target_link_libraries(freetype ${PNG_LIBRARIES})
|
target_link_libraries(freetype ${MAYBE_PRIVATE} ${PNG_LIBRARIES})
|
||||||
include_directories(${PNG_INCLUDE_DIRS})
|
include_directories(${PNG_INCLUDE_DIRS})
|
||||||
endif ()
|
endif ()
|
||||||
if (HARFBUZZ_FOUND)
|
if (HARFBUZZ_FOUND)
|
||||||
target_link_libraries(freetype ${HARFBUZZ_LIBRARIES})
|
target_link_libraries(freetype ${MAYBE_PRIVATE} ${HARFBUZZ_LIBRARIES})
|
||||||
include_directories(${HARFBUZZ_INCLUDE_DIRS})
|
include_directories(${HARFBUZZ_INCLUDE_DIRS})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -385,11 +395,16 @@ install(FILES
|
||||||
DESTINATION include/freetype2/freetype/config
|
DESTINATION include/freetype2/freetype/config
|
||||||
)
|
)
|
||||||
install(TARGETS freetype
|
install(TARGETS freetype
|
||||||
|
EXPORT freetype-targets
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
FRAMEWORK DESTINATION Library/Frameworks
|
FRAMEWORK DESTINATION Library/Frameworks
|
||||||
)
|
)
|
||||||
|
install(EXPORT freetype-targets
|
||||||
|
DESTINATION lib/cmake/freetype
|
||||||
|
FILE freetype-config.cmake
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Packaging
|
# Packaging
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
|
||||||
|
|
||||||
|
* CMakeLists.txt: Create `freetype-config.cmake' config module.
|
||||||
|
|
||||||
2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
|
2015-11-27 Tamas Kenez <tamas.kenez@adasworks.com>
|
||||||
|
|
||||||
* CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
|
* CMakeLists.txt: Set CMAKE_DEBUG_POSTFIX to `d'.
|
||||||
|
|
Loading…
Reference in New Issue