cmake: make HEADERS_DIR a required argument of SDL_generate_manpages

main
Anonymous Maarten 2023-09-29 03:42:33 +02:00
parent 5c1a91a4e1
commit 5be5000fa1
2 changed files with 3 additions and 2 deletions

View File

@ -2804,7 +2804,7 @@ set(SDL_REVISION "" CACHE STRING "Custom SDL revision (overrides SDL_REVISION_SU
if(NOT SDL_REVISION) if(NOT SDL_REVISION)
set(SDL_REVISION_SUFFIX "" CACHE STRING "Suffix for the SDL revision") set(SDL_REVISION_SUFFIX "" CACHE STRING "Suffix for the SDL revision")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt") if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt")
# If VERSION exists, it contains the SDL version # If VERSION.txt exists, it contains the SDL version
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" SDL_REVISION_CENTER) file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" SDL_REVISION_CENTER)
string(STRIP "${SDL_REVISION_CENTER}" SDL_REVISION_CENTER) string(STRIP "${SDL_REVISION_CENTER}" SDL_REVISION_CENTER)
else() else()
@ -3364,6 +3364,7 @@ if(NOT SDL_DISABLE_INSTALL)
if(NOT SDL_DISABLE_INSTALL_DOCS) if(NOT SDL_DISABLE_INSTALL_DOCS)
SDL_generate_manpages( SDL_generate_manpages(
HEADERS_DIR "${PROJECT_SOURCE_DIR}/include/SDL3"
SYMBOL "SDL_Init" SYMBOL "SDL_Init"
WIKIHEADERS_PL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-scripts/wikiheaders.pl" WIKIHEADERS_PL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-scripts/wikiheaders.pl"
REVISION "${SDL_REVISION}" REVISION "${SDL_REVISION}"

View File

@ -19,7 +19,7 @@ function(SDL_generate_manpages)
endif() endif()
if(NOT ARG_HEADERS_DIR) if(NOT ARG_HEADERS_DIR)
set(ARG_HEADERS_DIR "${PROJECT_SOURCE_DIR}/include/SDL3") message(FATAL_ERROR "Missing required HEADERS_DIR argument")
endif() endif()
# FIXME: get rid of SYMBOL and let the perl script figure out the dependencies # FIXME: get rid of SYMBOL and let the perl script figure out the dependencies