same old same old

This commit is contained in:
Erris
2026-03-10 11:11:52 +01:00
parent 073bb47586
commit d898960494

View File

@@ -43,13 +43,19 @@ target_include_directories(${PROJECT_EXECUTABLE_NAME} PUBLIC
"${CMAKE_SOURCE_DIR}/vendor/ImGuizmo"
)
file(GLOB DOTNET_NETHOST_PATH "/usr/share/dotnet/packs/Microsoft.NETCore.App.Host.*/*/runtimes/arch-x64/native")
set(DOTNET_ROOT "/usr/share/dotnet")
if(DOTNET_NETHOST_PATH)
target_include_directories(${PROJECT_EXECUTABLE_NAME} PUBLIC ${DOTNET_NETHOST_PATH})
else()
message(WARNING "nethost.h path not found automatically!")
endif()
# Locate the hostfxr and nethost headers
# Typically found in: host/fxr/<version>/ and packs/Microsoft.NETCore.App.Host.<arch>/<version>/runtime/native/
file(GLOB DOTNET_NETHOST_PATH "${DOTNET_ROOT}/packs/Microsoft.NETCore.App.Host.*/" )
find_path(NETHOST_INCLUDE_DIR nethost.h
PATHS "${DOTNET_NETHOST_PATH}"
PATH_SUFFIXES "runtime/native"
)
target_include_directories(${PROJECT_EXECUTABLE_NAME} PRIVATE ${NETHOST_INCLUDE_DIR})
target_link_libraries(${PROJECT_EXECUTABLE_NAME} PRIVATE "${DOTNET_ROOT}/packs/Microsoft.NETCore.App.Host.linux-x64/8.0.0/runtimes/linux-x64/native/libnethost.a")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
#set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -fsanitize=address")