]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
OSX: fix compile
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 28 Feb 2016 01:30:46 +0000 (12:30 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 28 Feb 2016 01:30:46 +0000 (12:30 +1100)
.travis.yml
README.md
contrib/bobtoolz/dialogs/dialogs-gtk.cpp
radiant/CMakeLists.txt
radiant/mainframe.cpp
tools/CMakeLists.txt

index d1f0e1db3c63e8f3d855316f6b9481e816c4e8d2..17246d559339ea4554f15dea1190338683d409cf 100644 (file)
@@ -30,4 +30,4 @@ before_script:
 script:
   - mkdir build && cd build
   - cmake ..
-  - cmake --build . --target radiant -- -j4
+  - cmake --build . -- -j4
index ff836cc363ba5ca6790006ae740285110d4df23d..6c7df1802faa899fe04de220cfc7a3bf177a907e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -64,6 +64,14 @@ cmake -G "MSYS Makefiles" .. -DGTK2_GLIBCONFIG_INCLUDE_DIR=/mingw64/lib/glib-2.0
 cmake --build . -- -j$(nproc)
 ```
 
+## OS X:
+
+```
+brew install gtkglext
+brew install Caskroom/cask/xquartz
+brew link --force gettext
+```
+
 More Compilation Details
 ------------------------
 
index 1b2ba6c854966909c00f452bd23dc9e2cd3676e2..10bc22d867dcc1b7e47b5961889940212fb2099e 100644 (file)
@@ -18,6 +18,9 @@
  */
 
 #include "dialogs-gtk.h"
+
+#include <cstdlib>
+
 #include "../funchandlers.h"
 
 #include "str.h"
index 8b704e7bb6020113e156fd2a8c2a9327b501dcf3..ab40b2a0038f09cd2e2dcb7fc7f8b7e7494f99d5 100644 (file)
@@ -5,6 +5,10 @@ find_package(OpenGL REQUIRED)
 include_directories("${CMAKE_SOURCE_DIR}/libs")
 include_directories("${CMAKE_SOURCE_DIR}/include")
 
+string(SUBSTRING ${CMAKE_SHARED_MODULE_SUFFIX} 1 -1 _clibext)
+add_definitions(-DCMAKE_SHARED_MODULE_SUFFIX="${_clibext}")
+unset(_clibext)
+
 set(RADIANTLIST
     autosave.cpp
     autosave.h
index a8e1e22a719f399a71904ed76f1a318b7081b481..f6b3e12535d82f7d39f2e9a48ecf92c43ee39781 100644 (file)
@@ -514,15 +514,7 @@ void operator()( const char* name ) const {
 }
 };
 
-const char* const c_library_extension =
-#if defined( WIN32 )
-       "dll"
-#elif defined ( __APPLE__ )
-       "dylib"
-#elif defined( __linux__ ) || defined ( __FreeBSD__ )
-       "so"
-#endif
-;
+const char* const c_library_extension = CMAKE_SHARED_MODULE_SUFFIX;
 
 void Radiant_loadModules( const char* path ){
        Directory_forEach( path, MatchFileExtension<CLoadModule>( c_library_extension, CLoadModule( path ) ) );
index e16c7ac6e7e86a68104867785c3302be00301285..a3fee086d6f81ebc8719527103ca7cdfe6b4f6fd 100644 (file)
@@ -6,7 +6,7 @@ macro(radiant_tool name)
     add_executable(${name} ${ARGN})
     if(NOT (CMAKE_EXECUTABLE_SUFFIX STREQUAL RADIANT_EXECUTABLE))
         add_custom_command(TARGET ${name} POST_BUILD
-            COMMAND ln -f -s -T "$<TARGET_FILE_NAME:${name}>" "${CMAKE_BINARY_DIR}/${name}.${RADIANT_EXECUTABLE}"
+            COMMAND ln -f -s "$<TARGET_FILE_NAME:${name}>" "${CMAKE_BINARY_DIR}/${name}.${RADIANT_EXECUTABLE}"
             VERBATIM
         )
     endif()