summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Collett2012-05-29 16:12:35 -0400
committerTimothy Collett2012-05-29 16:12:35 -0400
commit6d65683b02a7a78463d0b25e6cd56a7ae35d34cd (patch)
treefc2b1bc69b107921a4643f8d984a950bc1d9999a
parent20a00f53c4a6b4f105c09be9730892e0898e71d1 (diff)
downloaddfhack-6d65683b02a7a78463d0b25e6cd56a7ae35d34cd.tar.gz
dfhack-6d65683b02a7a78463d0b25e6cd56a7ae35d34cd.tar.bz2
dfhack-6d65683b02a7a78463d0b25e6cd56a7ae35d34cd.tar.xz
Adjust packaging for Mac
-rw-r--r--CMakeLists.txt6
-rw-r--r--library/CMakeLists.txt18
-rw-r--r--library/Hooks-darwin.cpp2
3 files changed, 18 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af3bba8d..62be3e8c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -160,7 +160,11 @@ endif()
# Packaging with CPack!
IF(UNIX)
- SET(CPACK_GENERATOR "TGZ")
+ if(APPLE)
+ SET(CPACK_GENERATOR "ZIP")
+ else()
+ SET(CPACK_GENERATOR "TGZ")
+ endif()
ELSEIF(WIN32)
SET(CPACK_GENERATOR "ZIP")
ENDIF()
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index c0e4b010..2035a5ce 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -232,7 +232,7 @@ 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)
- ENDIF()
+ ENDIF()
ELSE(WIN32)
#FIXME: do we really need psapi?
SET(PROJECT_LIBS psapi dfhack-tinyxml dfhack-tinythread)
@@ -268,8 +268,7 @@ SET_TARGET_PROPERTIES(dfhack PROPERTIES DEBUG_POSTFIX "-debug" )
IF(APPLE)
SET(SDL_LIBRARY ${CMAKE_INSTALL_PREFIX}/libs/SDL.framework)
TARGET_LINK_LIBRARIES(dfhack ${SDL_LIBRARY})
- TARGET_LINK_LIBRARIES(dfhack /System/Library/Frameworks/Foundation.framework)
- TARGET_LINK_LIBRARIES(dfhack /usr/lib/libc++.dylib)
+# TARGET_LINK_LIBRARIES(dfhack /usr/lib/libc++.dylib)
SET_TARGET_PROPERTIES(dfhack PROPERTIES VERSION 1.0.0)
SET_TARGET_PROPERTIES(dfhack PROPERTIES SOVERSION 1.0.0)
ENDIF()
@@ -281,11 +280,18 @@ TARGET_LINK_LIBRARIES(dfhack-client protobuf-lite clsocket)
TARGET_LINK_LIBRARIES(dfhack-run dfhack-client)
IF(UNIX)
- # On linux, copy our version of the df launch script which sets LD_PRELOAD
- install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack
+ if (APPLE)
+ install(PROGRAMS ${dfhack_SOURCE_DIR}/package/darwin/dfhack
+ DESTINATION .)
+ install(PROGRAMS ${dfhack_SOURCE_DIR}/package/darwin/dfhack-run
+ DESTINATION .)
+ else()
+ # On linux, copy our version of the df launch script which sets LD_PRELOAD
+ install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack
DESTINATION .)
- install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack-run
+ install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/dfhack-run
DESTINATION .)
+ endif()
ELSE()
if(NOT BUILD_EGGY)
# On windows, copy the renamed SDL so DF can still run.
diff --git a/library/Hooks-darwin.cpp b/library/Hooks-darwin.cpp
index b562a6b8..347881ee 100644
--- a/library/Hooks-darwin.cpp
+++ b/library/Hooks-darwin.cpp
@@ -132,7 +132,7 @@ DFhackCExport int SDL_Init(uint32_t flags)
{
// reroute stderr
fprintf(stderr,"dfhack: attempting to hook in\n");
- //freopen("stderr.log", "w", stderr);
+ freopen("stderr.log", "w", stderr);
// we don't reroute stdout until we figure out if this should be done at all
// See: Console-linux.cpp