1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-15 15:02:34 +02:00

Merge pull request #196 from qbit/master

add support for OpenBSD
This commit is contained in:
Daniel Evans 2016-08-12 01:03:20 +01:00 committed by GitHub
commit 160598b1bf
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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;