ddnet/cmake/FindSSP.cmake

21 lines
548 B
CMake
Raw Normal View History

2024-07-23 05:23:36 +00:00
# only find ssp when toolchain is gcc
if(TARGET_OS STREQUAL "windows"
AND NOT CMAKE_C_COMPILER_ID STREQUAL "Clang"
AND NOT CMAKE_C_COMPILER_ID STREQUAL "MSVC")
2023-07-28 12:28:22 +00:00
set_extra_dirs_lib(SSP ssp)
find_file(SSP_LIBRARY
NAMES libssp-0.dll
HINTS ${HINTS_SSP_LIBDIR}
PATHS ${PATHS_SSP_LIBDIR}
${CROSSCOMPILING_NO_CMAKE_SYSTEM_PATH}
)
is_bundled(SSP_BUNDLED "${SSP_LIBRARY}")
if(NOT SSP_BUNDLED)
message(FATAL_ERROR "could not find ssp paths")
endif()
set(SSP_COPY_FILES
"${EXTRA_SSP_LIBDIR}/libssp-0.dll"
)
endif()