- backend update from Raze.

Progdir stuff for POSIX.
This commit is contained in:
Christoph Oelckers 2022-11-13 07:44:36 +01:00
parent a21d0c70e4
commit 54f1cabed9
2 changed files with 10 additions and 1 deletions

View file

@ -468,9 +468,15 @@ elseif( APPLE )
set_source_files_properties( posix/osx/zdoom.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources )
set_source_files_properties( common/platform/posix/osx/iwadpicker_cocoa.mm PROPERTIES COMPILE_FLAGS -fobjc-exceptions )
else()
option (SYSTEMINSTALL "Set global progdir based on CMake Install Dir" OFF)
set( SYSTEM_SOURCES_DIR common/platform/posix common/platform/posix/sdl )
set( SYSTEM_SOURCES ${PLAT_POSIX_SOURCES} ${PLAT_SDL_SOURCES} ${PLAT_UNIX_SOURCES} )
set( OTHER_SYSTEM_SOURCES ${PLAT_WIN32_SOURCES} ${PLAT_OSX_SOURCES} ${PLAT_COCOA_SOURCES} )
if ( SYSTEMINSTALL )
add_definitions( -DPROGDIR="${CMAKE_INSTALL_PREFIX}/${INSTALL_PK3_PATH}" )
endif()
endif()
if( HAVE_MMX )

View file

@ -174,7 +174,9 @@ int main (int argc, char **argv)
Args = new FArgs(argc, argv);
// Should we even be doing anything with progdir on Unix systems?
#ifdef PROGDIR
progdir = PROGDIR;
#else
char program[PATH_MAX];
if (realpath (argv[0], program) == NULL)
strcpy (program, argv[0]);
@ -188,6 +190,7 @@ int main (int argc, char **argv)
{
progdir = "./";
}
#endif
I_StartupJoysticks();