First Commit

This commit is contained in:
2025-02-06 22:24:29 +08:00
parent ed7df4c81e
commit 7539e6a53c
18116 changed files with 6181499 additions and 0 deletions

View File

@ -0,0 +1,12 @@
# ===-----------------------------------------------------------------------===#
# Distributed under the 3-Clause BSD License. See accompanying file LICENSE or
# copy at https://opensource.org/licenses/BSD-3-Clause).
# SPDX-License-Identifier: BSD-3-Clause
# ===-----------------------------------------------------------------------===#
# Helper script to check if a file exists at build time
message(STATUS "Checking if installed file \"${FILE_TO_CHECK}\" exists")
if(NOT EXISTS ${FILE_TO_CHECK})
message(FATAL_ERROR "\"${FILE_TO_CHECK}\" doesn't exist.")
endif()

View File

@ -0,0 +1,36 @@
# ===-----------------------------------------------------------------------===#
# Distributed under the 3-Clause BSD License. See accompanying file LICENSE or
# copy at https://opensource.org/licenses/BSD-3-Clause).
# SPDX-License-Identifier: BSD-3-Clause
# ===-----------------------------------------------------------------------===#
include(GNUInstallDirs)
# add custom target to check the installed files at build time
add_custom_target(do-checks)
function(check_file_exists file_to_check)
add_custom_command(
TARGET do-checks
POST_BUILD
COMMAND ${CMAKE_COMMAND} -DFILE_TO_CHECK=${file_to_check} -P
${CMAKE_CURRENT_LIST_DIR}/CheckFileExists.cmake
COMMENT "Checking if ${file_to_check} exists...")
endfunction()
if(MSVC)
if(CRYPTOPP_BUILD_SHARED)
check_file_exists(${CMAKE_INSTALL_FULL_LIBDIR}/cryptopp.dll)
else()
check_file_exists(${CMAKE_INSTALL_FULL_LIBDIR}/cryptopp.lib)
endif()
else()
check_file_exists(${CMAKE_INSTALL_FULL_LIBDIR}/$<TARGET_FILE_NAME:cryptopp>)
endif()
check_file_exists(${CMAKE_INSTALL_FULL_INCLUDEDIR}/${CRYPTOPP_INCLUDE_PREFIX})
check_file_exists(
${CMAKE_INSTALL_FULL_INCLUDEDIR}/${CRYPTOPP_INCLUDE_PREFIX}/config.h)
check_file_exists(${CMAKE_INSTALL_FULL_DATAROOTDIR}/pkgconfig/cryptopp.pc)
check_file_exists(${CMAKE_INSTALL_FULL_DATAROOTDIR}/cmake/cryptopp)
check_file_exists(
${CMAKE_INSTALL_FULL_DATAROOTDIR}/cmake/cryptopp/cryptoppConfig.cmake)