Improve MSVC project generation
- set startup project to fgfs - guess a value for PATH based on the build config
This commit is contained in:
parent
7c9b1b391f
commit
82f23e556e
2 changed files with 19 additions and 0 deletions
|
@ -584,6 +584,10 @@ add_subdirectory(man)
|
|||
add_subdirectory(package)
|
||||
add_subdirectory(scripts)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
### MSVC startup project - ensure you can just hit build & run in MSVC
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT fgfs)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
### uninstall target
|
||||
#-----------------------------------------------------------------------------
|
||||
|
|
|
@ -112,3 +112,18 @@ endif()
|
|||
if (COMMAND flightgear_test)
|
||||
flightgear_test(autosaveMigration test_autosaveMigration.cxx)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
if (TARGET Qt5::qmake)
|
||||
# property is the full path to qmake.exe
|
||||
get_target_property(_qt5_qmake_path Qt5::qmake LOCATION)
|
||||
get_filename_component(_qt5_bin_dir ${_qt5_qmake_path} DIRECTORY)
|
||||
file(TO_NATIVE_PATH "${_qt5_bin_dir}" _qt5_bin_dir_native)
|
||||
endif()
|
||||
|
||||
file(TO_NATIVE_PATH "${MSVC_3RDPARTY_ROOT}/${MSVC_3RDPARTY_DIR}/bin" _msvc_3rdparty_bin_dir)
|
||||
file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}" _install_bin_dir)
|
||||
|
||||
set_property(TARGET fgfs PROPERTY
|
||||
VS_GLOBAL_LocalDebuggerEnvironment "PATH=${_install_bin_dir};${_msvc_3rdparty_bin_dir};${_qt5_bin_dir_native}")
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue