1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-25 11:52:40 +01:00

add support for OpenBSD

This commit is contained in:
Aaron Bieber 2016-08-11 15:42:42 -06:00
parent 612a314126
commit e8b28c7168
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;