diff --git a/CMakeLists.txt b/CMakeLists.txt index 14b6d2219..03d76d8b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,8 +30,16 @@ LIST (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/") include(GNUInstallDirs) SET (prefix ${CMAKE_INSTALL_PREFIX}) SET (exec_prefix ${CMAKE_INSTALL_PREFIX}) -SET (libdir ${CMAKE_INSTALL_LIBDIR}) -SET (includedir ${CMAKE_INSTALL_INCLUDEDIR}) +IF (IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) + SET (libdir ${CMAKE_INSTALL_LIBDIR}) +ELSE () + SET (libdir "\${prefix}/${CMAKE_INSTALL_LIBDIR}") +ENDIF () +IF (IS_ABSOLUTE ${CMAKE_INSTALL_INCLUDEDIR}) + SET (includedir ${CMAKE_INSTALL_INCLUDEDIR}) +ELSE () + SET (includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +ENDIF () OPTION (MSGPACK_32BIT "32bit compile" OFF) diff --git a/msgpack-c.pc.in b/msgpack-c.pc.in index 14806b7b4..208066252 100644 --- a/msgpack-c.pc.in +++ b/msgpack-c.pc.in @@ -1,7 +1,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ -libdir=${prefix}/@libdir@ -includedir=${prefix}/@includedir@ +libdir=@libdir@ +includedir=@includedir@ Name: MessagePack Description: Binary-based efficient object serialization library