Skip to content

Commit

Permalink
Respect CMAKE_INSTALL_<dir> (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell authored Aug 15, 2023
1 parent 2db9cdb commit 44de4a7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ INCLUDE_DIRECTORIES( SYSTEM ${CLHEP_INCLUDE_DIRS} ) # needed for gearsurf only
AUX_SOURCE_DIRECTORY( ./gearsurf libgearsurf_srcs )
ADD_SHARED_LIBRARY( gearsurf ${libgearsurf_srcs} )
TARGET_LINK_LIBRARIES( gearsurf ${CLHEP_LIBRARIES} )
INSTALL_SHARED_LIBRARY( gearsurf DESTINATION lib )
INSTALL_SHARED_LIBRARY( gearsurf DESTINATION ${CMAKE_INSTALL_LIBDIR} )
# ----------------------------------------------------


# -------- libgear (impl) ----------------------------
AUX_SOURCE_DIRECTORY( ./gearimpl libgear_srcs )
ADD_SHARED_LIBRARY( gear ${libgear_srcs} )
INSTALL_SHARED_LIBRARY( gear DESTINATION lib )
INSTALL_SHARED_LIBRARY( gear DESTINATION ${CMAKE_INSTALL_LIBDIR} )
TARGET_LINK_LIBRARIES( gear gearsurf )
# ----------------------------------------------------

Expand All @@ -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 @@ -71,10 +71,10 @@ IF( BUILD_TESTING )
IF( GEAR_TGEO )
ADD_EXECUTABLE( printMaterials ./test/printMaterials.cc )
TARGET_LINK_LIBRARIES( printMaterials gear gearxml )
INSTALL( TARGETS printMaterials DESTINATION bin )
INSTALL( TARGETS printMaterials DESTINATION ${CMAKE_INSTALL_BINDIR} )
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 44de4a7

Please sign in to comment.