diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cab41ffb..8d7b9a7ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,10 +22,6 @@ add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/import/XbSymbolDatabase") add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/import/SDL2" EXCLUDE_FROM_ALL) -if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])") - add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/import/cs_x86") -endif() - # Cxbx-Reloaded projects set(CXBXR_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}) diff --git a/import/cs_x86 b/import/cs_x86 index 5fb27bcf6..f8a95b7af 160000 --- a/import/cs_x86 +++ b/import/cs_x86 @@ -1 +1 @@ -Subproject commit 5fb27bcf6745c35d8889e48ead4314022b8ec931 +Subproject commit f8a95b7afa963c90b01a9e7cd758346f95c90f50 diff --git a/src/CxbxDebugger/App.config b/src/CxbxDebugger/App.config index d1428ad71..a31359ba5 100644 --- a/src/CxbxDebugger/App.config +++ b/src/CxbxDebugger/App.config @@ -1,6 +1,6 @@ - + diff --git a/src/CxbxDebugger/CMakeLists.txt b/src/CxbxDebugger/CMakeLists.txt index 1146f9f13..947c7e425 100644 --- a/src/CxbxDebugger/CMakeLists.txt +++ b/src/CxbxDebugger/CMakeLists.txt @@ -13,6 +13,12 @@ add_compile_options( /langversion:6 ) +# First, we must define .NET Framework version before include cs_x86's projects. +# Which then will pass down version we want unified. +set(DOTNET_TARGET_FRAMEWORK_VERSION "v4.8") + +add_subdirectory("${CXBXR_ROOT_DIR}/import/cs_x86" "${CMAKE_BINARY_DIR}/import/cs_x86") + set(CXBXR_DEBUGGER_SRC_DIR "${CXBXR_ROOT_DIR}/src/CxbxDebugger") file (GLOB SOURCES @@ -128,16 +134,15 @@ source_group(TREE ${CXBXR_ROOT_DIR} FILES ${SOURCES}) add_executable(cxbxr-debugger WIN32 ${SOURCES} ${PROPERTIES} #Test WIN32 like cxbx does if doesn't need compile option set ) -set_target_properties(cxbxr-debugger PROPERTIES +set_target_properties(cxbxr-debugger PROPERTIES VS_DOTNET_REFERENCES "Microsoft.CSharp;System;System.Core;System.Data;System.Data.DataSetExtensions;System.Deployment;System.Drawing;System.Windows;System.Windows.Forms;System.Xml;System.Xml.Linq;System.Net.Http" VS_GLOBAL_ApplicationIcon "${CXBXR_ROOT_DIR}/src/gui/resource/Cxbx-R.ico" - - VS_GLOBAL_ROOTNAMESPACE "CxbxDebugger" - -) -set_property(TARGET cxbxr-debugger PROPERTY DOTNET_TARGET_FRAMEWORK_VERSION "v4.5") + VS_GLOBAL_ROOTNAMESPACE "CxbxDebugger" + + DOTNET_TARGET_FRAMEWORK_VERSION ${DOTNET_TARGET_FRAMEWORK_VERSION} +) target_link_libraries(cxbxr-debugger cs_x86)