Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

library path is now configurable (again) #1199

Merged
merged 1 commit into from Jul 22, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 15 additions & 15 deletions CMakeLists.txt
Expand Up @@ -4,6 +4,7 @@
# Copyright (c) 2011 Bryce Lelbach
# Copyright (c) 2011 Vinay C Amatya
# Copyright (c) 2013 Jeroen Habraken
# Copyright (c) 2014 Andreas Schäfer
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Expand Down Expand Up @@ -192,14 +193,13 @@ else()
"64" ADVANCED)
endif()

if (NOT DEFINED LIB)
set(LIB "lib")
endif(NOT DEFINED LIB)
set(LIB "lib"
CACHE STRING "library subdirectory, good for multilib installs (e.g. lib, lib)")
###############################################################################
if(UNIX)
hpx_link_directories("${CMAKE_BINARY_DIR}/lib/hpx")
hpx_link_directories("${CMAKE_BINARY_DIR}/${LIB}/hpx")
else()
hpx_link_directories("${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/lib/hpx")
hpx_link_directories("${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${LIB}/hpx")
endif()

###############################################################################
Expand Down Expand Up @@ -468,7 +468,7 @@ hpx_include(SetOutputPaths)
# RPATH configuration
################################################################################
if(NOT MSVC)
set(HPX_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB}/hpx:${CMAKE_BINARY_DIR}/lib/hpx"
set(HPX_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB}/hpx:${CMAKE_BINARY_DIR}/${LIB}/hpx"
CACHE STRING "Base RPATH for linking" FORCE)
endif()

Expand Down Expand Up @@ -1907,7 +1907,7 @@ endif()
# External build system support (FindHPX.cmake and pkg-config).
################################################################################
set(HPX_LINK_DIRECTORIES
"${CMAKE_INSTALL_PREFIX}/lib/hpx" ${HPX_LINK_DIRECTORIES})
"${CMAKE_INSTALL_PREFIX}/${LIB}/hpx" ${HPX_LINK_DIRECTORIES})
set(HPX_INCLUDE_DIRECTORIES
"${CMAKE_INSTALL_PREFIX}/include" ${HPX_INCLUDE_DIRECTORIES}
"${CMAKE_INSTALL_PREFIX}/include/hpx/external")
Expand Down Expand Up @@ -2026,31 +2026,31 @@ endif()

if(NOT ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug"))
configure_file("${hpx_SOURCE_DIR}/cmake/templates/hpx_application.pc.in"
"${output_dir}/lib/pkgconfig/hpx_application.pc"
"${output_dir}/${LIB}/pkgconfig/hpx_application.pc"
@ONLY)
configure_file("${hpx_SOURCE_DIR}/cmake/templates/hpx_component.pc.in"
"${output_dir}/lib/pkgconfig/hpx_component.pc"
"${output_dir}/${LIB}/pkgconfig/hpx_component.pc"
@ONLY)
else()
configure_file("${hpx_SOURCE_DIR}/cmake/templates/hpx_application_debug.pc.in"
"${output_dir}/lib/pkgconfig/hpx_application_debug.pc"
"${output_dir}/${LIB}/pkgconfig/hpx_application_debug.pc"
@ONLY)

configure_file("${hpx_SOURCE_DIR}/cmake/templates/hpx_component_debug.pc.in"
"${output_dir}/lib/pkgconfig/hpx_component_debug.pc"
"${output_dir}/${LIB}/pkgconfig/hpx_component_debug.pc"
@ONLY)
endif()

if(NOT HPX_NO_INSTALL)
if(NOT ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug"))
install(FILES "${output_dir}/lib/pkgconfig/hpx_application.pc"
install(FILES "${output_dir}/${LIB}/pkgconfig/hpx_application.pc"
DESTINATION ${LIB}/pkgconfig)
install(FILES "${output_dir}/lib/pkgconfig/hpx_component.pc"
install(FILES "${output_dir}/${LIB}/pkgconfig/hpx_component.pc"
DESTINATION ${LIB}/pkgconfig)
else()
install(FILES "${output_dir}/lib/pkgconfig/hpx_application_debug.pc"
install(FILES "${output_dir}/${LIB}/pkgconfig/hpx_application_debug.pc"
DESTINATION ${LIB}/pkgconfig)
install(FILES "${output_dir}/lib/pkgconfig/hpx_component_debug.pc"
install(FILES "${output_dir}/${LIB}/pkgconfig/hpx_component_debug.pc"
DESTINATION ${LIB}/pkgconfig)
endif()
endif()
Expand Down