Closed doctorpangloss closed 1 year ago
3.0.0-pre.4
Windows 2022 LTSC Unity 2021.3
nvcc
diff --git a/Plugin~/WebRTCPlugin/CMakeLists.txt b/Plugin~/WebRTCPlugin/CMakeLists.txt index 73b7411..e0b0212 100644 --- a/Plugin~/WebRTCPlugin/CMakeLists.txt +++ b/Plugin~/WebRTCPlugin/CMakeLists.txt @@ -1,5 +1,7 @@ add_library(WebRTCLib STATIC)
+target_precompile_headers(WebRTCLib PRIVATE pch.h) + target_sources( WebRTCLib PRIVATE Context.cpp @@ -121,8 +123,7 @@ if(Windows) endif()
if(Windows)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Yu /Yupch.h")
set(PROJECT_BINARY_DIR "${CMAKE_SOURCE_DIR}/../Runtime/Plugins/x86_64")
target_compile_definitions(WebRTCLib PUBLIC WEBRTC_WIN NOMINMAX @@ -150,8 +151,6 @@ if(Windows) WebRTCLib PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>")
set_source_files_properties(pch.cpp PROPERTIES COMPILE_FLAGS "/Yc /Ycpch.h") elseif(macOS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-lto -fno-rtti") diff --git a/Plugin~/WebRTCPluginTest/CMakeLists.txt b/Plugin~/WebRTCPluginTest/CMakeLists.txt index 8747e45..dede6a7 100644 --- a/Plugin~/WebRTCPluginTest/CMakeLists.txt +++ b/Plugin~/WebRTCPluginTest/CMakeLists.txt @@ -1,5 +1,7 @@ add_executable(WebRTCLibTest)
+target_precompile_headers(WebRTCLibTest PRIVATE pch.h) + target_sources( WebRTCLibTest PRIVATE pch.cpp @@ -84,8 +86,7 @@ else() endif()
target_link_libraries( WebRTCLibTest PRIVATE ${WEBRTC_LIBRARY} @@ -109,8 +110,6 @@ if(Windows) target_include_directories( WebRTCLibTest PRIVATE ${CUDA_INCLUDE_DIRS} ${Vulkan_INCLUDE_DIR} ${NVCODEC_INCLUDE_DIR})
4. Observe the issue is resolved.
CLion can't load the msvc cmake configuration.
It should be able to.
No response
@doctorpangloss It looks good to me. Can you make the PR for this fix?
memo: WRS-464
Package version
3.0.0-pre.4
Environment
Steps To Reproduce
nvcc
support and for correct debugging in Unity.+target_precompile_headers(WebRTCLib PRIVATE pch.h) + target_sources( WebRTCLib PRIVATE Context.cpp @@ -121,8 +123,7 @@ if(Windows) endif()
if(Windows)
Use precompiled header
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Yu /Yupch.h")
set(PROJECT_BINARY_DIR "${CMAKE_SOURCE_DIR}/../Runtime/Plugins/x86_64")
target_compile_definitions(WebRTCLib PUBLIC WEBRTC_WIN NOMINMAX @@ -150,8 +151,6 @@ if(Windows) WebRTCLib PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>")
Creare precompiled header
set_source_files_properties(pch.cpp PROPERTIES COMPILE_FLAGS "/Yc /Ycpch.h") elseif(macOS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-lto -fno-rtti") diff --git a/Plugin~/WebRTCPluginTest/CMakeLists.txt b/Plugin~/WebRTCPluginTest/CMakeLists.txt index 8747e45..dede6a7 100644 --- a/Plugin~/WebRTCPluginTest/CMakeLists.txt +++ b/Plugin~/WebRTCPluginTest/CMakeLists.txt @@ -1,5 +1,7 @@ add_executable(WebRTCLibTest)
+target_precompile_headers(WebRTCLibTest PRIVATE pch.h) + target_sources( WebRTCLibTest PRIVATE pch.cpp @@ -84,8 +86,7 @@ else() endif()
if(Windows)
Use precompiled header
target_link_libraries( WebRTCLibTest PRIVATE ${WEBRTC_LIBRARY} @@ -109,8 +110,6 @@ if(Windows) target_include_directories( WebRTCLibTest PRIVATE ${CUDA_INCLUDE_DIRS} ${Vulkan_INCLUDE_DIR} ${NVCODEC_INCLUDE_DIR})
Creare precompiled header
Current Behavior
CLion can't load the msvc cmake configuration.
Expected Behavior
It should be able to.
Anything else?
No response