Files
Hoops_Exchange/exchange/exchangesource/NetWrapper/CMakeLists.txt
2025-12-15 23:22:33 +08:00

33 lines
909 B
CMake

add_library(NetWrapper SHARED)
target_include_directories(NetWrapper PRIVATE ./)
target_link_libraries(NetWrapper PRIVATE hoops_samples)
set_target_properties(NetWrapper PROPERTIES
COMMON_LANGUAGE_RUNTIME ""
VS_GLOBAL_CLRSupport true
DOTNET_TARGET_FRAMEWORK_VERSION 4.0
)
target_compile_definitions(NetWrapper PRIVATE Exchange_LIBRARY_PATH="${Exchange_LIBRARY_PATH}")
target_sources(NetWrapper
PRIVATE
AssemblyInfo.cpp
Translation.cpp
Translation.h
)
# Check if .NET SDK is available
find_program(DOTNET_EXECUTABLE dotnet)
if(DOTNET_EXECUTABLE)
execute_process(COMMAND ${DOTNET_EXECUTABLE} --list-sdks OUTPUT_VARIABLE DOTNET_SDKS OUTPUT_STRIP_TRAILING_WHITESPACE)
if(DOTNET_SDKS)
add_subdirectory(ConsoleApplication)
else()
message(WARNING "No .NET SDKs found. Skipping ConsoleApplication.")
endif()
else()
message(WARNING ".NET SDK not found. Skipping ConsoleApplication.")
endif()