Skip to content

Commit

Permalink
Merge pull request #1121 from otegami/support-absolute-path-for-pkg-c…
Browse files Browse the repository at this point in the history
…onfig

Support absolute path for CMAKE_INSTALL_*DIR
  • Loading branch information
redboltz authored May 14, 2024
2 parents c31fafb + 4e027b7 commit a5c8a2c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions msgpack-c.pc.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a5c8a2c

Please sign in to comment.