Commit d8ad829a authored by Ghislain MARY's avatar Ghislain MARY

Generate shortcut to the Visual Studio solution in the top directory when...

Generate shortcut to the Visual Studio solution in the top directory when preparing the build on Windows.
parent 19809f35
......@@ -20,14 +20,21 @@
#
############################################################################
# Create a shortcut to linphone.exe in install prefix
if(LINPHONE_BUILDER_TARGET STREQUAL linphoneqt AND WIN32)
# Create a shortcut to linphone.exe in install prefix
set(SHORTCUT_PATH "${CMAKE_INSTALL_PREFIX}/linphone.lnk")
set(SHORTCUT_TARGET_PATH "${CMAKE_INSTALL_PREFIX}/bin/linphone.exe")
set(SHORTCUT_WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}")
configure_file("${CMAKE_CURRENT_LIST_DIR}/linphone_package/winshortcut.vbs.in" "${CMAKE_CURRENT_BINARY_DIR}/winshortcut.vbs" @ONLY)
add_custom_command(OUTPUT "${SHORTCUT_PATH}" COMMAND "cscript" "${CMAKE_CURRENT_BINARY_DIR}/winshortcut.vbs")
add_custom_target(linphoneqt_winshortcut ALL DEPENDS "${SHORTCUT_PATH}" TARGET_linphone_builder)
# Create a shortcut to the solution file in the top directory
set(SHORTCUT_PATH "${CMAKE_SOURCE_DIR}/../../Project.lnk")
set(SHORTCUT_TARGET_PATH "${LINPHONE_BUILDER_WORK_DIR}/cmake/Project.sln")
set(SHORTCUT_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/../..")
configure_file("${CMAKE_CURRENT_LIST_DIR}/linphone_package/winshortcut.vbs.in" "${CMAKE_CURRENT_BINARY_DIR}/solutionshortcut.vbs" @ONLY)
execute_process(COMMAND "cscript" "${CMAKE_CURRENT_BINARY_DIR}/solutionshortcut.vbs")
endif()
# Packaging
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment