mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 09:20:59 +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 )
|
if( WIN32 )
|
||||||
set( INSTALL_PK3_PATH . CACHE STRING "Directory where engine data will be placed during install." )
|
set( INSTALL_PK3_PATH . CACHE STRING "Directory where engine data will be placed during install." )
|
||||||
else()
|
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()
|
endif()
|
||||||
install(FILES "${PROJECT_BINARY_DIR}/${PK3_NAME}"
|
install(FILES "${PROJECT_BINARY_DIR}/${PK3_NAME}"
|
||||||
DESTINATION ${INSTALL_PK3_PATH}
|
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( 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 )
|
set_source_files_properties( common/platform/posix/osx/iwadpicker_cocoa.mm PROPERTIES COMPILE_FLAGS -fobjc-exceptions )
|
||||||
else()
|
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_DIR common/platform/posix common/platform/posix/sdl )
|
||||||
set( SYSTEM_SOURCES ${PLAT_POSIX_SOURCES} ${PLAT_SDL_SOURCES} ${PLAT_UNIX_SOURCES} )
|
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} )
|
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()
|
endif()
|
||||||
|
|
||||||
if( HAVE_MMX )
|
if( HAVE_MMX )
|
||||||
|
|
|
@ -174,7 +174,9 @@ int main (int argc, char **argv)
|
||||||
|
|
||||||
Args = new FArgs(argc, 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];
|
char program[PATH_MAX];
|
||||||
if (realpath (argv[0], program) == NULL)
|
if (realpath (argv[0], program) == NULL)
|
||||||
strcpy (program, argv[0]);
|
strcpy (program, argv[0]);
|
||||||
|
@ -188,6 +190,7 @@ int main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
progdir = "./";
|
progdir = "./";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
I_StartupJoysticks();
|
I_StartupJoysticks();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue