Skip to content

Commit

Permalink
Shooting in the dark
Browse files Browse the repository at this point in the history
  • Loading branch information
stigrj committed Feb 6, 2025
1 parent f5ec711 commit e97767b
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,33 @@ add_subdirectory(qmoperators)
add_subdirectory(solventeffect)

target_link_libraries(mrchem-tests
PUBLIC
mrchem
Catch2::Catch2WithMain
PUBLIC mrchem Catch2::Catch2WithMain
)

# RPATH fixing
file(RELATIVE_PATH _rel ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR} ${CMAKE_INSTALL_PREFIX})
if(APPLE)
set(_rpath "@loader_path/${_rel}")
else()
set(_rpath "\$ORIGIN/${_rel}")
endif()
file(TO_NATIVE_PATH "${_rpath}/${CMAKE_INSTALL_LIBDIR}" _RPATH)

set_target_properties(mrchem-tests
PROPERTIES
MACOSX_RPATH ON
SKIP_BUILD_RPATH OFF
BUILD_WITH_INSTALL_RPATH OFF
INSTALL_RPATH "${_RPATH}"
INSTALL_RPATH_USE_LINK_PATH ON
)

install(
TARGETS
mrchem-tests
RUNTIME
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT bin
)

# Integration tests
Expand Down

0 comments on commit e97767b

Please sign in to comment.