Skip to content

Instantly share code, notes, and snippets.

@dankegel
Created October 23, 2013 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dankegel/7125867 to your computer and use it in GitHub Desktop.
Save dankegel/7125867 to your computer and use it in GitHub Desktop.
Patch to set libassimp.dylib's install_name on MacOSX to the final installed path of the library. This prevents runtime linking problems for apps that link against this library.
--- assimp--3.0.1270-source-only/code/CMakeLists.txt.xyz 2013-10-22 16:37:58.000000000 -0700
+++ assimp--3.0.1270-source-only/code/CMakeLists.txt 2013-10-22 16:40:54.000000000 -0700
@@ -663,6 +663,11 @@
OUTPUT_NAME assimp${ASSIMP_LIBRARY_SUFFIX}
CLEAN_DIRECT_OUTPUT 1
)
+if (APPLE)
+ SET_TARGET_PROPERTIES( assimp PROPERTIES
+ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}"
+ )
+endif()
# Build against external unzip, or add ../contrib/unzip so
# assimp can #include "unzip.h"
if (UNZIP_FOUND)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment