From 7e88631698077ef88dced138126dd9f36acc6388 Mon Sep 17 00:00:00 2001 From: Timothy Collett Date: Thu, 24 May 2012 15:02:53 -0400 Subject: [PATCH] Trying a different method now (with install_name_tool) --- CMakeLists.txt | 1 - library/CMakeLists.txt | 7 +++++-- library/Hooks-linux.cpp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec11c08e9..af3bba8dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,6 @@ include_directories(${ZLIB_INCLUDE_DIRS}) include_directories(depends/clsocket/src) if(APPLE) include_directories(${CMAKE_INSTALL_PREFIX}/libs/SDL.framework/Headers) - SET(PROJECT_LIBS SDL) endif() add_subdirectory(depends) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 3245653c1..16954727e 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -221,7 +221,7 @@ ENDIF() IF(UNIX) SET(PROJECT_LIBS rt dl dfhack-md5 dfhack-tinyxml dfhack-tinythread) IF(APPLE) - SET(PROJECT_LIBS dl dfhack-md5 dfhack-tinyxml dfhack-tinythread SDL) + SET(PROJECT_LIBS dl dfhack-md5 dfhack-tinyxml dfhack-tinythread) # include_directories(${CMAKE_INSTALL_PREFIX}/libs/SDL.framework/Headers) ENDIF() ELSE(WIN32) @@ -257,7 +257,10 @@ ENDIF() SET_TARGET_PROPERTIES(dfhack PROPERTIES DEBUG_POSTFIX "-debug" ) IF(APPLE) - TARGET_LINK_LIBRARIES(dfhack ${CMAKE_INSTALL_PREFIX}/libs/SDL.framework/SDL) + SET(SDL_LIBRARY ${CMAKE_INSTALL_PREFIX}/libs/SDL.framework) + TARGET_LINK_LIBRARIES(dfhack ${SDL_LIBRARY}) + SET_TARGET_PROPERTIES(dfhack PROPERTIES VERSION 1.0.0) + SET_TARGET_PROPERTIES(dfhack PROPERTIES SOVERSION 1.0.0) ENDIF() TARGET_LINK_LIBRARIES(dfhack protobuf-lite clsocket lua ${PROJECT_LIBS}) diff --git a/library/Hooks-linux.cpp b/library/Hooks-linux.cpp index 5a3291a1e..92aaa5320 100644 --- a/library/Hooks-linux.cpp +++ b/library/Hooks-linux.cpp @@ -157,4 +157,4 @@ DFhackCExport int DFH_SDL_Init(uint32_t flags) */ int ret = SDL_Init(flags); return ret; -} +} \ No newline at end of file