mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- Allow proper setting of progdir
for SDL targets.
This commit is contained in:
parent
800e7939b8
commit
0033826544
3 changed files with 11 additions and 2 deletions
|
@ -99,7 +99,7 @@ function( add_pk3 PK3_NAME PK3_DIR )
|
|||
if( WIN32 )
|
||||
set( INSTALL_PK3_PATH . CACHE STRING "Directory where engine data will be placed during install." )
|
||||
else()
|
||||
set( INSTALL_PK3_PATH share/games/raze CACHE STRING "Directory where engine data will be placed during install." )
|
||||
set( INSTALL_PK3_PATH ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME} CACHE STRING "Directory where engine data will be placed during install." )
|
||||
endif()
|
||||
install(FILES "${PROJECT_BINARY_DIR}/${PK3_NAME}"
|
||||
DESTINATION ${INSTALL_PK3_PATH}
|
||||
|
|
|
@ -503,9 +503,15 @@ elseif( APPLE )
|
|||
set_source_files_properties( platform/posix/osx/${PROJECT_NAME}.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 )
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue