mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Rewrite polymc.6 in scdoc, build, and install it
Co-authored-by: Sefa Eyeoglu <contact@scrumplex.net> Signed-off-by: Tomasz Kramkowski <tomasz@kramkow.ski>
This commit is contained in:
@ -1,3 +1,13 @@
|
||||
if(UNIX)
|
||||
find_package(PkgConfig)
|
||||
if(PkgConfig_FOUND)
|
||||
pkg_search_module(SCDOC scdoc)
|
||||
if(SCDOC_FOUND)
|
||||
pkg_get_variable(SCDOC_SCDOC scdoc scdoc)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(Launcher_CommonName "PolyMC")
|
||||
|
||||
set(Launcher_Copyright "PolyMC Contributors\\n© 2012-2021 MultiMC Contributors")
|
||||
@ -12,7 +22,6 @@ set(Launcher_DesktopFileName "org.polymc.PolyMC.desktop" PARENT_SCOPE)
|
||||
|
||||
set(Launcher_Desktop "program_info/org.polymc.PolyMC.desktop" PARENT_SCOPE)
|
||||
set(Launcher_MetaInfo "program_info/org.polymc.PolyMC.metainfo.xml" PARENT_SCOPE)
|
||||
set(Launcher_ManPage "program_info/polymc.6.txt" PARENT_SCOPE)
|
||||
set(Launcher_SVG "program_info/org.polymc.PolyMC.svg" PARENT_SCOPE)
|
||||
set(Launcher_Branding_ICNS "program_info/polymc.icns" PARENT_SCOPE)
|
||||
set(Launcher_Branding_ICO "program_info/polymc.ico")
|
||||
@ -28,3 +37,15 @@ configure_file(polymc.rc.in polymc.rc @ONLY)
|
||||
configure_file(polymc.manifest.in polymc.manifest @ONLY)
|
||||
configure_file(polymc.ico polymc.ico COPYONLY)
|
||||
configure_file(win_install.nsi.in win_install.nsi @ONLY)
|
||||
|
||||
if(SCDOC_FOUND)
|
||||
set(in_scd "${CMAKE_CURRENT_SOURCE_DIR}/polymc.6.scd")
|
||||
set(out_man "${CMAKE_CURRENT_BINARY_DIR}/polymc.6")
|
||||
add_custom_command(
|
||||
DEPENDS "${in_scd}"
|
||||
OUTPUT "${out_man}"
|
||||
COMMAND ${SCDOC_SCDOC} < "${in_scd}" > "${out_man}"
|
||||
)
|
||||
add_custom_target(man ALL DEPENDS ${out_man})
|
||||
set(Launcher_ManPage "program_info/polymc.6" PARENT_SCOPE)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user