diff options
Diffstat (limited to 'project')
-rw-r--r-- | project/cmake/CMakeLists.txt | 1 | ||||
-rw-r--r-- | project/cmake/scripts/windows/ArchSetup.cmake | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/project/cmake/CMakeLists.txt b/project/cmake/CMakeLists.txt index af71d7d4a3..e46a4f8492 100644 --- a/project/cmake/CMakeLists.txt +++ b/project/cmake/CMakeLists.txt @@ -315,6 +315,7 @@ unset(_MAIN_LIBRARIES) if(WIN32) set_target_properties(${APP_NAME_LC} PROPERTIES WIN32_EXECUTABLE ON) + set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${APP_NAME_LC}) copy_main_dlls_to_buildtree() elseif(CORE_SYSTEM_NAME STREQUAL android) # Nothing diff --git a/project/cmake/scripts/windows/ArchSetup.cmake b/project/cmake/scripts/windows/ArchSetup.cmake index f09e8b309e..1edbf3f742 100644 --- a/project/cmake/scripts/windows/ArchSetup.cmake +++ b/project/cmake/scripts/windows/ArchSetup.cmake @@ -80,4 +80,11 @@ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OP if(CMAKE_GENERATOR MATCHES "Visual Studio") set_property(GLOBAL PROPERTY USE_FOLDERS ON) + + # Generate a batch file that opens Visual Studio with the necessary env variables set. + file(WRITE ${CMAKE_BINARY_DIR}/kodi-sln.bat + "@echo off\n" + "set KODI_HOME=%~dp0\n" + "set PATH=%~dp0\\system\n" + "start %~dp0\\${PROJECT_NAME}.sln") endif() |