Skip to content

Commit

Permalink
COMP: Allow install lib directory name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Rit committed Oct 10, 2022
1 parent 38f68e0 commit 55aa84b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,23 @@ set(RTK_LIBRARIES RTK)
#=========================================================
# Installation variables
#=========================================================
if(NOT CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR lib)
endif()
if(NOT RTK_INSTALL_RUNTIME_DIR)
set(RTK_INSTALL_RUNTIME_DIR bin)
endif()
if(NOT RTK_INSTALL_LIB_DIR)
set(RTK_INSTALL_LIB_DIR lib)
set(RTK_INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR})
endif()
if(NOT RTK_INSTALL_ARCHIVE_DIR)
set(RTK_INSTALL_ARCHIVE_DIR lib)
set(RTK_INSTALL_ARCHIVE_DIR ${CMAKE_INSTALL_LIBDIR})
endif()
if(NOT RTK_INSTALL_INCLUDE_DIR)
set(RTK_INSTALL_INCLUDE_DIR include/RTK)
endif()
if(NOT RTK_INSTALL_PACKAGE_DIR)
set(RTK_INSTALL_PACKAGE_DIR "lib/cmake/RTK")
set(RTK_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/RTK")
endif()

#Set position independent code for Unix (-fPIC)
Expand Down Expand Up @@ -131,10 +134,10 @@ if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${RTK_BINARY_DIR}/bin)
endif()
if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${RTK_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${RTK_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
endif()
if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${RTK_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${RTK_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
endif()

#=========================================================
Expand Down

0 comments on commit 55aa84b

Please sign in to comment.