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

Fix having to set LD_LIBRARY_PATH on Linux #132

Closed
schmoelder opened this issue Jun 19, 2023 · 1 comment · Fixed by #134
Closed

Fix having to set LD_LIBRARY_PATH on Linux #132

schmoelder opened this issue Jun 19, 2023 · 1 comment · Fixed by #134

Comments

@schmoelder
Copy link
Contributor

On Linux, I always have to set LD_LIBRARY_PATH in order to run CADET.

@mbeyss mentioned this is usually a sign of some mal-configured cmake file and it should be fixed.

@schmoelder
Copy link
Contributor Author

This works on my machine. @sleweke this should also capture APPLE, right?

if (UNIX)
	# The RPATH to be used when installing, but only if it's not a system directory
	set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
	list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
	if ("${isSystemDir}" STREQUAL "-1")
		set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
	endif()
endif()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant