mirror of
https://github.com/libretro/pcsx2.git
synced 2024-11-28 20:00:44 +00:00
cmake: add a new option to select the doc path in package mode
DOC_DIR_COMPILATION=/usr/share/doc/pcsx2 close issue #402
This commit is contained in:
parent
8123b5090a
commit
0c17d67fa5
@ -67,23 +67,23 @@ write_svnrev_h()
|
||||
# make the translation
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/locales")
|
||||
add_subdirectory(locales)
|
||||
endif(EXISTS "${CMAKE_SOURCE_DIR}/locales")
|
||||
endif()
|
||||
|
||||
# make common
|
||||
if(common_libs)
|
||||
add_subdirectory(common/src/Utilities)
|
||||
add_subdirectory(common/src/x86emitter)
|
||||
endif(common_libs)
|
||||
endif()
|
||||
|
||||
# make pcsx2
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/pcsx2" AND pcsx2_core)
|
||||
add_subdirectory(pcsx2)
|
||||
endif(EXISTS "${CMAKE_SOURCE_DIR}/pcsx2" AND pcsx2_core)
|
||||
endif()
|
||||
|
||||
# make plugins
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/plugins")
|
||||
add_subdirectory(plugins)
|
||||
endif(EXISTS "${CMAKE_SOURCE_DIR}/plugins")
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Install some files to ease package creation
|
||||
@ -104,4 +104,4 @@ if(PACKAGE_MODE)
|
||||
INSTALL(FILES "${CMAKE_SOURCE_DIR}/bin/docs/PCSX2_FAQ.pdf" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/pcsx2")
|
||||
INSTALL(FILES "${CMAKE_SOURCE_DIR}/bin/docs/PCSX2_Readme.pdf" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/pcsx2")
|
||||
INSTALL(FILES "${CMAKE_SOURCE_DIR}/bin/docs/pcsx2.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1/")
|
||||
endif(PACKAGE_MODE)
|
||||
endif()
|
||||
|
@ -39,19 +39,23 @@ option(GTK3_API "Use GTK3 api (experimental/wxWidget must be built with GTK3 sup
|
||||
if(PACKAGE_MODE)
|
||||
if(NOT DEFINED PLUGIN_DIR)
|
||||
set(PLUGIN_DIR "${CMAKE_INSTALL_PREFIX}/lib/games/pcsx2")
|
||||
endif(NOT DEFINED PLUGIN_DIR)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED GAMEINDEX_DIR)
|
||||
set(GAMEINDEX_DIR "${CMAKE_INSTALL_PREFIX}/share/games/pcsx2")
|
||||
endif(NOT DEFINED GAMEINDEX_DIR)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED BIN_DIR)
|
||||
set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
endif(NOT DEFINED BIN_DIR)
|
||||
endif()
|
||||
|
||||
# Compile all source codes with these 2 defines
|
||||
add_definitions(-DPLUGIN_DIR_COMPILATION=${PLUGIN_DIR} -DGAMEINDEX_DIR_COMPILATION=${GAMEINDEX_DIR})
|
||||
endif(PACKAGE_MODE)
|
||||
if(NOT DEFINED DOC_DIR)
|
||||
set(DOC_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/pcsx2")
|
||||
endif()
|
||||
|
||||
# Compile all source codes with those defines
|
||||
add_definitions(-DPLUGIN_DIR_COMPILATION=${PLUGIN_DIR} -DGAMEINDEX_DIR_COMPILATION=${GAMEINDEX_DIR} -DDOC_DIR_COMPILATION=${DOC_DIR})
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Compiler extra
|
||||
|
@ -9,7 +9,7 @@ if(NOT TOP_CMAKE_WAS_SOURCED)
|
||||
message(FATAL_ERROR "
|
||||
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
|
||||
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
|
||||
endif(NOT TOP_CMAKE_WAS_SOURCED)
|
||||
endif()
|
||||
|
||||
|
||||
# set common flags
|
||||
@ -650,20 +650,20 @@ if(Linux)
|
||||
set(Platform
|
||||
${pcsx2LinuxSources}
|
||||
${pcsx2LinuxHeaders})
|
||||
endif(Linux)
|
||||
endif()
|
||||
|
||||
# Windows
|
||||
if(Windows)
|
||||
set(Platform
|
||||
${pcsx2WindowsSources}
|
||||
${pcsx2WindowsHeaders})
|
||||
endif(Windows)
|
||||
endif()
|
||||
|
||||
# MacOSX
|
||||
if(MacOSX)
|
||||
set(Platform
|
||||
)
|
||||
endif(MacOSX)
|
||||
endif()
|
||||
|
||||
set(pcsx2FinalSources
|
||||
${Common}
|
||||
@ -703,6 +703,6 @@ endforeach()
|
||||
# See issue: 1233
|
||||
if(PACKAGE_MODE)
|
||||
SET_SOURCE_FILES_PROPERTIES(gui/AppConfig.cpp PROPERTIES COMPILE_FLAGS "-Wp,-ansi,-U__STRICT_ANSI__")
|
||||
endif(PACKAGE_MODE)
|
||||
endif()
|
||||
|
||||
add_pcsx2_executable(${Output} "${pcsx2FinalSources}" "${pcsx2FinalLibs}" "${pcsx2FinalFlags}")
|
||||
|
@ -70,8 +70,15 @@ Panels::FirstTimeIntroPanel::FirstTimeIntroPanel( wxWindow* parent )
|
||||
SetMinWidth( 600 );
|
||||
|
||||
FastFormatUnicode faqFile;
|
||||
faqFile.Write( L"file:///%s/Docs/PCSX2_FAQ.pdf",
|
||||
WX_STR(InstallFolder.ToString()) );
|
||||
#ifndef DOC_DIR_COMPILATION
|
||||
faqFile.Write( L"file:///%s/Docs/PCSX2_FAQ.pdf", WX_STR(InstallFolder.ToString()) );
|
||||
#else
|
||||
// Each linux distributions have his rules for path so we give them the possibility to
|
||||
// change it with compilation flags. -- Gregory
|
||||
#define xDOC_str(s) DOC_str(s)
|
||||
#define DOC_str(s) #s
|
||||
faqFile.Write( L"file://%s/PCSX2_FAQ.pdf", xDOC_str(DOC_DIR_COMPILATION) );
|
||||
#endif
|
||||
|
||||
wxStaticBoxSizer& langSel = *new wxStaticBoxSizer( wxVERTICAL, this, _("Language selector") );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user