Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
if (NOT CMAKE_BUILD_TYPE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE Release)
endif()
include(GNUInstallDirs)

option(BUILD_SHARED_LIBS "Make library a shared library instead of static." ON)
option(BUILD_TESTING "Build test harnesses along with library." ON)
Expand Down Expand Up @@ -92,9 +93,9 @@ if (NOT GRAPHITE2_NFILEFACE)
endif()

set(version 3.0.1)
set(libdir ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
set(includedir ${CMAKE_INSTALL_PREFIX}/include)

configure_file(graphite2.pc.in graphite2.pc)

install(FILES ${PROJECT_BINARY_DIR}/graphite2.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
install(FILES ${PROJECT_BINARY_DIR}/graphite2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
7 changes: 4 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set(GRAPHITE_VERSION ${GRAPHITE_API_CURRENT}.${GRAPHITE_API_REVISION}.${GRAPHITE
set(GRAPHITE_SO_VERSION ${GRAPHITE_API_CURRENT})

include(TestBigEndian)
include(GNUInstallDirs)

include_directories(${PROJECT_SOURCE_DIR})

Expand Down Expand Up @@ -112,7 +113,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
endif ()
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
if (BUILD_SHARED_LIBS)
CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
CREATE_LIBTOOL_FILE(graphite2 "/${CMAKE_INSTALL_LIBDIR}")
endif()
endif()

Expand All @@ -131,7 +132,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
endif ()
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
if (BUILD_SHARED_LIBS)
CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
CREATE_LIBTOOL_FILE(graphite2 "/${CMAKE_INSTALL_LIBDIR}")
endif()
endif()

Expand All @@ -141,5 +142,5 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
endif()


install(TARGETS graphite2 EXPORT graphite2 LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin)
install(TARGETS graphite2 EXPORT graphite2 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} PUBLIC_HEADER DESTINATION include/graphite2 RUNTIME DESTINATION bin)
install(EXPORT graphite2 DESTINATION share/graphite2 NAMESPACE gr2_)