script:
- mkdir build && cd build
- cmake ..
- - cmake --build . --target radiant -- -j4
+ - cmake --build . -- -j4
cmake --build . -- -j$(nproc)
```
+## OS X:
+
+```
+brew install gtkglext
+brew install Caskroom/cask/xquartz
+brew link --force gettext
+```
+
More Compilation Details
------------------------
*/
#include "dialogs-gtk.h"
+
+#include <cstdlib>
+
#include "../funchandlers.h"
#include "str.h"
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
}
};
-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 ) ) );
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()