mirror of https://github.com/fltk/fltk
CMake/Windows/MSVC: add DLL path as target property
This modifies the debug environment so demo programs linked to FLTK DLL's can be debugged w/o copying FLTK DLL's to the build folders of the demo programs. This is work in progress and may be improved in a future commit but it works as it is now for all demo programs.
This commit is contained in:
parent
34ed30fe1a
commit
e8ad00d9fe
|
@ -168,6 +168,14 @@ function (CREATE_EXAMPLE NAME SOURCES LIBRARIES)
|
|||
unset (WRAPPER)
|
||||
endif (MAC_BUNDLE)
|
||||
|
||||
if (MSVC AND TARGET fltk_SHARED)
|
||||
set (DllDir "$<SHELL_PATH:$<TARGET_FILE_DIR:fltk_SHARED>>")
|
||||
## fl_debug_var (DllDir)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES
|
||||
VS_DEBUGGER_ENVIRONMENT "PATH=${DllDir};$ENV{PATH}"
|
||||
)
|
||||
endif()
|
||||
|
||||
######################################################################
|
||||
# Parse optional fourth argument, see description above.
|
||||
######################################################################
|
||||
|
|
Loading…
Reference in New Issue