if (BUILD_BINARIES)
if (APPLE)
if (BUILD_RADIANT)
- option(XWINDOWS "Build against X11" ON)
- endif()
+ option(XWINDOWS "Build against X11" ON)
+ endif ()
add_definitions(
-DPOSIX=1
)
+
+ link_directories(
+ /usr/local/lib
+ )
elseif (WIN32)
add_definitions(
-DWIN32=1
set(GAME_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
endif ()
install(CODE
- "execute_process(COMMAND \"${PROJECT_SOURCE_DIR}/gamepack-manager\" --license ${GAMEPACKS_LICENSE_LIST} --name ${GAMEPACKS_NAME_LIST} --download-dir \"${PROJECT_BINARY_DIR}/download\" --install-dir \"${GAME_INSTALL_PREFIX}\" --install)"
+ "execute_process(COMMAND \"${PROJECT_SOURCE_DIR}/gamepack-manager\" --license ${GAMEPACKS_LICENSE_LIST} --name ${GAMEPACKS_NAME_LIST} --download-dir \"${PROJECT_BINARY_DIR}/download\" --install-dir \"${GAME_INSTALL_PREFIX}\" --install)"
)
endif()
pacman -S --needed base-devel mingw-w64-x86_64-{toolchain,cmake,make,gtk2,gtkglext,libwebp}
```
-## OS X:
+## macOS:
```
-brew install gtkglext
-brew install webp
-brew install Caskroom/cask/xquartz
+brew install gcc cmake Caskroom/cask/xquartz gtkglext pkgconfig minizip webp coreutils gnu-sed
brew link --force gettext
```
cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build -- -j$(nproc)
```
+On Mac you have to add this to the first cmake call:
+
+```
+-DCMAKE_C_COMPILER=/usr/local/bin/gcc-9 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-9 -DOPENGL_INCLUDE_DIR=/opt/X11/include -DOPENGL_gl_LIBRARY=/opt/X11/lib/libGL.dylib
+```
+
## Build and installation details
### Compilation details
if (GtkGLExt_FIND_REQUIRED)
set(_pkgconfig_REQUIRED REQUIRED)
endif ()
- if (XWINDOWS)
+ if (APPLE)
+ # libffi is provided by base system so brew does not take the risk to override it
+ # hence then need for an explicit look-up
+ set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/libffi/lib/pkgconfig")
+ pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-1.0 gtkglext-quartz-1.0)
+ elseif (XWINDOWS)
pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-x11-1.0)
elseif (WIN32)
pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-win32-1.0)
- else ()
- pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-quartz-1.0)
endif ()
else ()
find_path(GtkGLExt_INCLUDE_DIRS gtkglwidget.h)