Skip to content

Commit

Permalink
allow builder to specify RPATH in a cmake variable if they so choose …
Browse files Browse the repository at this point in the history
…- cmake -DYAJL_RPATH_PREFIX=/home/y ..
  • Loading branch information
lloyd committed Jul 17, 2010
1 parent 7e43244 commit 179ab8b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Expand Up @@ -38,6 +38,15 @@ SET (YAJL_MICRO 10)

SET (YAJL_DIST_NAME "yajl-${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO}")

# RPATH handling. When YAJL_RPATH_PREFIX cmake var is set, we'll use that
# base for rpath instead of CMAKE_INSTALL_PREFIX
IF (YAJL_RPATH_PREFIX)
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH "${YAJL_RPATH_PREFIX}/lib")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
ENDIF (YAJL_RPATH_PREFIX)

IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release")
ENDIF (NOT CMAKE_BUILD_TYPE)
Expand Down

0 comments on commit 179ab8b

Please sign in to comment.