cmake: don't install sdlmanpages.cmake
parent
9ee1200e6f
commit
afdd448834
|
@ -3537,7 +3537,6 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
configure_file("cmake/sdlfind.cmake" "sdlfind.cmake" COPYONLY)
|
configure_file("cmake/sdlfind.cmake" "sdlfind.cmake" COPYONLY)
|
||||||
configure_file("cmake/sdlmanpages.cmake" "sdlmanpages.cmake" COPYONLY)
|
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
configure_package_config_file(cmake/SDL3Config.cmake.in SDL3Config.cmake
|
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}/SDL3Config.cmake
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/SDL3ConfigVersion.cmake
|
${CMAKE_CURRENT_BINARY_DIR}/SDL3ConfigVersion.cmake
|
||||||
${SDL3_SOURCE_DIR}/cmake/sdlfind.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}"
|
DESTINATION "${SDL_SDL_INSTALL_REAL_CMAKEDIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -3690,10 +3687,10 @@ if(NOT SDL_DISABLE_INSTALL)
|
||||||
include(CPack)
|
include(CPack)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(WIKIHEADERS_PL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-scripts/wikiheaders.pl")
|
|
||||||
if(NOT SDL_DISABLE_INSTALL_MAN)
|
if(NOT SDL_DISABLE_INSTALL_MAN)
|
||||||
SDL_generate_manpages(
|
SDL_generate_manpages(
|
||||||
SYMBOL "SDL_Init"
|
SYMBOL "SDL_Init"
|
||||||
|
WIKIHEADERS_PL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-scripts/wikiheaders.pl"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -93,8 +93,3 @@ set(SDL3_STATIC_LIBRARIES SDL3::SDL3-static)
|
||||||
set(SDL3_STATIC_PRIVATE_LIBS)
|
set(SDL3_STATIC_PRIVATE_LIBS)
|
||||||
|
|
||||||
set(SDL3TEST_LIBRARY SDL3::SDL3_test)
|
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()
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ include(CMakeParseArguments)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
function(SDL_generate_manpages)
|
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)
|
if(NOT ARG_NAME)
|
||||||
set(ARG_NAME "${PROJECT_NAME}")
|
set(ARG_NAME "${PROJECT_NAME}")
|
||||||
|
@ -36,17 +36,17 @@ function(SDL_generate_manpages)
|
||||||
|
|
||||||
set(result FALSE)
|
set(result FALSE)
|
||||||
|
|
||||||
if(PERL_FOUND AND EXISTS "${WIKIHEADERS_PL_PATH}")
|
if(PERL_FOUND AND EXISTS "${ARG_WIKIHEADERS_PL_PATH}")
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md"
|
OUTPUT "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md"
|
||||||
COMMAND "${PERL_EXECUTABLE}" "${WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" --copy-to-wiki
|
COMMAND "${PERL_EXECUTABLE}" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_SOURCE_DIR}" "${BUILD_WIKIDIR}" "--options=${ARG_OPTION_FILE}" --copy-to-wiki
|
||||||
DEPENDS ${HEADER_FILES} "${WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}"
|
DEPENDS ${HEADER_FILES} "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}"
|
||||||
COMMENT "Generating ${ARG_NAME} wiki markdown files"
|
COMMENT "Generating ${ARG_NAME} wiki markdown files"
|
||||||
)
|
)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${BUILD_MANDIR}/man3/${ARG_SYMBOL}.3"
|
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
|
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" "${WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}"
|
DEPENDS "${BUILD_WIKIDIR}/${ARG_SYMBOL}.md" "${ARG_WIKIHEADERS_PL_PATH}" "${ARG_OPTION_FILE}"
|
||||||
COMMENT "Generating ${ARG_NAME} man pages"
|
COMMENT "Generating ${ARG_NAME} man pages"
|
||||||
)
|
)
|
||||||
add_custom_target(${ARG_NAME}-docs ALL DEPENDS "${BUILD_MANDIR}/man3/${ARG_SYMBOL}.3")
|
add_custom_target(${ARG_NAME}-docs ALL DEPENDS "${BUILD_MANDIR}/man3/${ARG_SYMBOL}.3")
|
||||||
|
|
Loading…
Reference in New Issue