From afdd448834de581f354b14cfdb7a4223f6cbac41 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 27 Jun 2023 19:02:33 +0200 Subject: [PATCH] cmake: don't install sdlmanpages.cmake --- CMakeLists.txt | 5 +---- cmake/SDL3Config.cmake.in | 5 ----- cmake/sdlmanpages.cmake | 12 ++++++------ 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17d99c467..1c912e7bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3537,7 +3537,6 @@ else() endif() configure_file("cmake/sdlfind.cmake" "sdlfind.cmake" COPYONLY) -configure_file("cmake/sdlmanpages.cmake" "sdlmanpages.cmake" COPYONLY) include(CMakePackageConfigHelpers) configure_package_config_file(cmake/SDL3Config.cmake.in SDL3Config.cmake @@ -3656,8 +3655,6 @@ if(NOT SDL_DISABLE_INSTALL) ${CMAKE_CURRENT_BINARY_DIR}/SDL3Config.cmake ${CMAKE_CURRENT_BINARY_DIR}/SDL3ConfigVersion.cmake ${SDL3_SOURCE_DIR}/cmake/sdlfind.cmake - ${SDL3_SOURCE_DIR}/build-scripts/wikiheaders.pl - ${SDL3_SOURCE_DIR}/cmake/sdlmanpages.cmake DESTINATION "${SDL_SDL_INSTALL_REAL_CMAKEDIR}" ) @@ -3690,10 +3687,10 @@ if(NOT SDL_DISABLE_INSTALL) include(CPack) endif() - set(WIKIHEADERS_PL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-scripts/wikiheaders.pl") if(NOT SDL_DISABLE_INSTALL_MAN) SDL_generate_manpages( SYMBOL "SDL_Init" + WIKIHEADERS_PL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-scripts/wikiheaders.pl" ) endif() endif() diff --git a/cmake/SDL3Config.cmake.in b/cmake/SDL3Config.cmake.in index 3b4033167..18bce2706 100644 --- a/cmake/SDL3Config.cmake.in +++ b/cmake/SDL3Config.cmake.in @@ -93,8 +93,3 @@ set(SDL3_STATIC_LIBRARIES SDL3::SDL3-static) set(SDL3_STATIC_PRIVATE_LIBS) set(SDL3TEST_LIBRARY SDL3::SDL3_test) - -if(SDL3_FOUND) - set(WIKIHEADERS_PL_PATH "${CMAKE_CURRENT_LIST_DIR}/wikiheaders.pl") - include("${CMAKE_CURRENT_LIST_DIR}/sdlmanpages.cmake") -endif() diff --git a/cmake/sdlmanpages.cmake b/cmake/sdlmanpages.cmake index c9992b0c2..9d11c9baa 100644 --- a/cmake/sdlmanpages.cmake +++ b/cmake/sdlmanpages.cmake @@ -2,7 +2,7 @@ include(CMakeParseArguments) include(GNUInstallDirs) function(SDL_generate_manpages) - cmake_parse_arguments(ARG "" "RESULT_VARIABLE;NAME;BUILD_DOCDIR;HEADERS_DIR;SOURCE_DIR;SYMBOL;OPTION_FILE" "" ${ARGN}) + cmake_parse_arguments(ARG "" "RESULT_VARIABLE;NAME;BUILD_DOCDIR;HEADERS_DIR;SOURCE_DIR;SYMBOL;OPTION_FILE;WIKIHEADERS_PL_PATH" "" ${ARGN}) if(NOT ARG_NAME) set(ARG_NAME "${PROJECT_NAME}") @@ -36,17 +36,17 @@ function(SDL_generate_manpages) set(result FALSE) - if(PERL_FOUND AND EXISTS "${WIKIHEADERS_PL_PATH}") + if(PERL_FOUND AND EXISTS "${ARG_WIKIHEADERS_PL_PATH}") add_custom_command( OUTPUT "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md" - COMMAND "${PERL_EXECUTABLE}" "${WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" --copy-to-wiki - DEPENDS ${HEADER_FILES} "${WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}" + COMMAND "${PERL_EXECUTABLE}" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" --copy-to-wiki + DEPENDS ${HEADER_FILES} "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}" COMMENT "Generating ${ARG_NAME} wiki markdown files" ) add_custom_command( OUTPUT "${BUILD_MANDIR}/man3/${ARG_SYMBOL}.3" - COMMAND "${PERL_EXECUTABLE}" "${WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" "--manpath=${BUILD_MANDIR}" --copy-to-manpages - DEPENDS "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md" "${WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}" + COMMAND "${PERL_EXECUTABLE}" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" "--manpath=${BUILD_MANDIR}" --copy-to-manpages + DEPENDS "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}" COMMENT "Generating ${ARG_NAME} man pages" ) add_custom_target(${ARG_NAME}-docs ALL DEPENDS "${BUILD_MANDIR}/man3/${ARG_SYMBOL}.3")