Files
loot-condition-interpreter/ffi/CMakeLists.txt
T

23 lines
753 B
CMake
Raw Normal View History

2026-06-22 21:34:46 +01:00
cmake_minimum_required(VERSION 2.8...4.3)
2018-10-07 22:13:48 +01:00
project(ffi_tests CXX)
2026-06-22 21:34:46 +01:00
add_executable(ffi_cpp_tests "${PROJECT_SOURCE_DIR}/tests/ffi.cpp")
2018-10-07 22:13:48 +01:00
2026-06-22 21:34:46 +01:00
set_target_properties(ffi_cpp_tests PROPERTIES CXX_STANDARD 11)
2018-10-07 22:13:48 +01:00
2026-06-22 21:34:46 +01:00
target_include_directories(ffi_cpp_tests PRIVATE "${PROJECT_SOURCE_DIR}/include")
2018-10-07 22:13:48 +01:00
2026-06-22 21:34:46 +01:00
target_link_libraries(ffi_cpp_tests PRIVATE
"${PROJECT_SOURCE_DIR}/../target/debug/${CMAKE_STATIC_LIBRARY_PREFIX}loot_condition_interpreter_ffi${CMAKE_STATIC_LIBRARY_SUFFIX}")
2018-10-07 22:13:48 +01:00
2026-06-22 21:34:46 +01:00
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_link_libraries(ffi_cpp_tests PRIVATE pthread dl)
endif()
2018-10-07 22:13:48 +01:00
2026-06-22 21:34:46 +01:00
if(MSVC)
target_link_libraries(ffi_cpp_tests PRIVATE ntdll ws2_32 Userenv bcrypt)
endif()
2018-10-07 22:13:48 +01:00
enable_testing()
add_test(ffi_cpp_tests ffi_cpp_tests)