Skip to content

Commit

Permalink
Respect CMAKE_INSTALL_<dir> and don't put libraries in lib64
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Jul 17, 2023
1 parent 2db9cdb commit 7e99414
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ FIND_PACKAGE( ILCUTIL COMPONENTS ILCSOFT_CMAKE_MODULES REQUIRED )
# load default settings from ILCSOFT_CMAKE_MODULES
INCLUDE( ilcsoft_default_settings )

# Build to lib instead of lib64:
if (CMAKE_INSTALL_LIBDIR STREQUAL lib64)
set(CMAKE_INSTALL_LIBDIR lib)
endif()

# root is needed to build tgeo
OPTION( GEAR_TGEO "Set to ON to build tgeo (ROOT >= 5.27.06 required)" OFF )
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ENDIF()
# -------- libgearxml --------------------------------
AUX_SOURCE_DIRECTORY( ./gearxml libgearxml_srcs )
ADD_SHARED_LIBRARY( gearxml ${libgearxml_srcs} )
INSTALL_SHARED_LIBRARY( gearxml DESTINATION lib )
INSTALL_SHARED_LIBRARY( gearxml DESTINATION ${CMAKE_INSTALL_LIBDIR} )
TARGET_LINK_LIBRARIES( gearxml gear ${CMAKE_DL_LIBS} )


Expand All @@ -74,7 +74,7 @@ IF( BUILD_TESTING )
INSTALL( TARGETS printMaterials DESTINATION bin )
ENDIF()

INSTALL( TARGETS mergeXML printParameters DESTINATION bin )
INSTALL( TARGETS mergeXML printParameters DESTINATION ${CMAKE_INSTALL_BINDIR} )

# test binaries
SET( test_bins
Expand Down

0 comments on commit 7e99414

Please sign in to comment.