summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorAshe Connor <kivikakk@github.com>2017-11-02 19:58:10 +1100
committerGitHub <noreply@github.com>2017-11-02 19:58:10 +1100
commit1326fd0d8d945b1eb33c5c5d2f536c6fda0201d1 (patch)
tree0177899c8713b2bf13c437c83dabd54032463d6e /src/CMakeLists.txt
parent9853666272e87c83050f7e30ae4b3ed9890c8c4f (diff)
parent5da792fc3714f66a88aabb5d13cb0eed674cb6c5 (diff)
Merge branch 'master' into upstream/inline-sourcepos
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3197196..d5a1936 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,6 +2,8 @@ if(${CMAKE_VERSION} VERSION_GREATER "3.3")
cmake_policy(SET CMP0063 NEW)
endif()
+include(GNUInstallDirs)
+
set(LIBRARY "libcmark")
set(STATICLIBRARY "libcmark_static")
set(HEADERS
@@ -123,19 +125,21 @@ endif(MSVC)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+set(libdir lib${LIB_SUFFIX})
+
include (InstallRequiredSystemLibraries)
install(TARGETS ${PROGRAM} ${CMARK_INSTALL}
EXPORT cmark
RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib${LIB_SUFFIX}
- ARCHIVE DESTINATION lib${LIB_SUFFIX}
+ LIBRARY DESTINATION ${libdir}
+ ARCHIVE DESTINATION ${libdir}
)
if(CMARK_SHARED OR CMARK_STATIC)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcmark.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libcmark.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcmark.pc
- DESTINATION lib${LIB_SUFFIX}/pkgconfig)
+ DESTINATION ${libdir}/pkgconfig)
install(FILES
cmark.h
@@ -144,7 +148,7 @@ if(CMARK_SHARED OR CMARK_STATIC)
DESTINATION include
)
- install(EXPORT cmark DESTINATION lib${LIB_SUFFIX}/cmake)
+ install(EXPORT cmark DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake)
endif()
# Feature tests