diff options
author | José Fonseca <jfonseca@vmware.com> | 2013-10-28 15:38:42 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2013-10-28 15:38:42 +0000 |
commit | 60054362291e059d86edfbe5c5cb33b74a1a1378 (patch) | |
tree | 131f4f5c2867695b31ab6f9bb0fcc9e274baa69f | |
parent | 2926190052f1ff36ec0d0f9e18885f83ebbca13c (diff) |
cgltrace: Use DYLD_FRAMEWORK_PATH instead of DYLD_LIBRARY_PATH.
It seems that from MacOSX 10.9 DYLD_FRAMEWORK_PATH takes precendence
over DYLD_LIBRARY_PATH for frameworks.
Issue #181.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README.markdown | 2 | ||||
-rw-r--r-- | cli/cli_trace.cpp | 7 | ||||
-rw-r--r-- | wrappers/.gitignore | 1 | ||||
-rw-r--r-- | wrappers/CMakeLists.txt | 6 |
5 files changed, 10 insertions, 7 deletions
@@ -10,6 +10,7 @@ *.dylib *.exe *.exp +*.framework *.gz *.ilk *.json diff --git a/README.markdown b/README.markdown index cbfca9c4..47f27b86 100644 --- a/README.markdown +++ b/README.markdown @@ -155,7 +155,7 @@ previous section. To trace Java applications, refer to Dalvik.markdown. Run the application you want to trace as - DYLD_LIBRARY_PATH=/path/to/apitrace/wrappers /path/to/application + DYLD_FRAMEWORK_PATH=/path/to/apitrace/wrappers /path/to/application Note that although Mac OS X has an `LD_PRELOAD` equivalent, `DYLD_INSERT_LIBRARIES`, it is mostly useless because it only works with diff --git a/cli/cli_trace.cpp b/cli/cli_trace.cpp index 2b7d5b68..60111d05 100644 --- a/cli/cli_trace.cpp +++ b/cli/cli_trace.cpp @@ -41,8 +41,8 @@ #if defined(__APPLE__) -#define TRACE_VARIABLE "DYLD_LIBRARY_PATH" -#define GL_TRACE_WRAPPER "OpenGL" +#define TRACE_VARIABLE "DYLD_FRAMEWORK_PATH" +#define GL_TRACE_WRAPPER "OpenGL.framework/OpenGL" #elif defined(_WIN32) #define GL_TRACE_WRAPPER "opengl32.dll" #else @@ -169,7 +169,8 @@ traceProgram(trace::API api, #if defined(__APPLE__) /* On Mac OS X, using DYLD_LIBRARY_PATH, we actually set the - * directory, not the file. */ + * parent directory, not the file. */ + wrapperPath.trimFilename(); wrapperPath.trimFilename(); #endif diff --git a/wrappers/.gitignore b/wrappers/.gitignore index dfd8c304..c4724d28 100644 --- a/wrappers/.gitignore +++ b/wrappers/.gitignore @@ -1,4 +1,3 @@ -OpenGL cgltrace.cpp d2d1trace.cpp d3d8trace.cpp diff --git a/wrappers/CMakeLists.txt b/wrappers/CMakeLists.txt index f48b5a8f..9d9b0e61 100644 --- a/wrappers/CMakeLists.txt +++ b/wrappers/CMakeLists.txt @@ -367,7 +367,9 @@ elseif (APPLE) set_target_properties (cgltrace PROPERTIES # OpenGL framework name - PREFIX "" OUTPUT_NAME "OpenGL" SUFFIX "" + OUTPUT_NAME "OpenGL" + # Mac framework + FRAMEWORK true # Specificy the version and reexport GLU symbols LINK_FLAGS "-compatibility_version 1 -current_version 1.0.0 -Wl,-reexport_library,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib" ) @@ -382,7 +384,7 @@ elseif (APPLE) dl ) - install (TARGETS cgltrace LIBRARY DESTINATION ${WRAPPER_INSTALL_DIR}) + install (TARGETS cgltrace FRAMEWORK DESTINATION ${WRAPPER_INSTALL_DIR}) elseif (X11_FOUND) # libGL.so add_custom_command ( |