From e8b28c7168c074174c97bcfce98452d31eff04b8 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Thu, 11 Aug 2016 15:42:42 -0600 Subject: [PATCH] add support for OpenBSD --- CMakeLists.txt | 4 ++++ rwgame/GameConfig.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6fb10fe..b4ce228e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,9 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") add_definitions(-DRW_OSX) elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") add_definitions(-DRW_FREEBSD) +elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") + add_definitions(-DRW_OPENBSD) + set(OPENRW_PLATFORM_LIBS iconv) elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") add_definitions(-DRW_WINDOWS) set(BULLET_ROOT "$ENV{BULLET_ROOT}") @@ -95,6 +98,7 @@ find_package(SDL2 REQUIRED) include_directories( ${SDL2_INCLUDE_DIR} ${GLM_INCLUDE_DIRS} + ${OPENGL_INCLUDE_DIR} ) # External-internal dependencies diff --git a/rwgame/GameConfig.cpp b/rwgame/GameConfig.cpp index 7f18a2e8..69f79f8a 100644 --- a/rwgame/GameConfig.cpp +++ b/rwgame/GameConfig.cpp @@ -43,7 +43,7 @@ bool GameConfig::isValid() std::string GameConfig::getDefaultConfigPath() { -#if defined(RW_LINUX) || defined(RW_FREEBSD) +#if defined(RW_LINUX) || defined(RW_FREEBSD) || defined(RW_OPENBSD) char* config_home = getenv("XDG_CONFIG_HOME"); if (config_home != nullptr) { return std::string(config_home) + "/" + kConfigDirectoryName;