2012-05-26 14:49:10 +02:00
|
|
|
#=============================================================================
|
|
|
|
# MuseScore
|
2019-12-04 10:11:14 +01:00
|
|
|
# Music Composition & Notation
|
2012-05-26 14:49:10 +02:00
|
|
|
#
|
2019-12-04 10:11:14 +01:00
|
|
|
# Copyright (C) 2019 MuseScore BVBA
|
2012-05-26 14:49:10 +02:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License version 2.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
#=============================================================================
|
|
|
|
|
2019-12-18 09:57:52 +01:00
|
|
|
if (MINGW)
|
|
|
|
set (resource_file ${PROJECT_BINARY_DIR}/resfile.o)
|
|
|
|
endif (MINGW)
|
|
|
|
if (MSVC)
|
|
|
|
# MSVC recognizes a *.rc file and will invoke the resource compiler to link it
|
2020-12-02 10:51:41 +01:00
|
|
|
set (resource_file ${CMAKE_CURRENT_LIST_DIR}/res/mscore.rc)
|
2019-12-18 09:57:52 +01:00
|
|
|
endif ( MSVC )
|
|
|
|
|
2012-05-26 14:49:10 +02:00
|
|
|
if (APPLE)
|
2014-07-22 16:43:29 +02:00
|
|
|
set (ExecutableName mscore MACOSX_BUNDLE)
|
|
|
|
set (MACOSX_BUNDLE_ICON_FILE mscore.icns)
|
|
|
|
set (MACOSX_BUNDLE_GUI_IDENTIFIER org.musescore.MuseScore)
|
|
|
|
set (MACOSX_BUNDLE_LONG_VERSION_STRING ${MUSESCORE_VERSION_FULL})
|
|
|
|
set (MACOSX_BUNDLE_BUNDLE_NAME MuseScore)
|
|
|
|
set (MACOSX_BUNDLE_SHORT_VERSION_STRING ${MUSESCORE_VERSION})
|
|
|
|
set (MACOSX_BUNDLE_BUNDLE_VERSION ${MUSESCORE_VERSION_FULL})
|
2018-09-25 11:24:37 +02:00
|
|
|
if(CMAKE_BUILD_NUMBER)
|
2019-12-04 10:11:14 +01:00
|
|
|
set (MACOSX_BUNDLE_SHORT_VERSION_STRING ${MUSESCORE_VERSION_FULL}.${CMAKE_BUILD_NUMBER})
|
|
|
|
set (MACOSX_BUNDLE_BUNDLE_VERSION ${MUSESCORE_VERSION_FULL}.${CMAKE_BUILD_NUMBER})
|
2018-09-25 11:24:37 +02:00
|
|
|
endif(CMAKE_BUILD_NUMBER)
|
2019-12-04 10:11:14 +01:00
|
|
|
set (MACOSX_BUNDLE_COPYRIGHT musescore.org)
|
2012-05-26 14:49:10 +02:00
|
|
|
else (APPLE)
|
2014-07-22 16:43:29 +02:00
|
|
|
set (ExecutableName mscore)
|
2012-05-26 14:49:10 +02:00
|
|
|
endif (APPLE)
|
|
|
|
|
2019-12-20 12:08:25 +01:00
|
|
|
include_directories(
|
2020-04-25 18:50:24 +02:00
|
|
|
${PROJECT_SOURCE_DIR}/framework/global
|
2019-12-20 12:08:25 +01:00
|
|
|
${PROJECT_BINARY_DIR}
|
2020-02-03 11:34:55 +01:00
|
|
|
${QTSINGLEAPPLICATION_INCLUDE_DIRS}
|
2019-12-20 12:08:25 +01:00
|
|
|
)
|
|
|
|
|
2019-12-04 10:11:14 +01:00
|
|
|
add_executable(${ExecutableName}
|
2019-12-18 09:57:52 +01:00
|
|
|
${resource_file}
|
2019-12-04 10:11:14 +01:00
|
|
|
main.cpp
|
2020-03-12 13:32:43 +01:00
|
|
|
modulessetup.cpp
|
|
|
|
modulessetup.h
|
2012-05-26 14:49:10 +02:00
|
|
|
)
|
|
|
|
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
if (MINGW OR MSVC)
|
2018-10-27 08:13:15 +02:00
|
|
|
set(MSCORE_OUTPUT_NAME ${MUSESCORE_NAME}${MUSESCORE_VERSION_MAJOR})
|
2015-07-25 01:26:54 +02:00
|
|
|
elseif (MSCORE_INSTALL_SUFFIX)
|
|
|
|
set(MSCORE_OUTPUT_NAME "${ExecutableName}${MSCORE_INSTALL_SUFFIX}")
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
endif (MINGW OR MSVC)
|
2014-12-08 10:30:06 +01:00
|
|
|
|
2020-09-19 11:26:42 +02:00
|
|
|
message("[cmake] MSCORE_OUTPUT_NAME: ${MSCORE_OUTPUT_NAME}")
|
2016-06-10 10:37:53 +02:00
|
|
|
# If MSCORE_OUTPUT_NAME is set (e.g, when cmake is called by the user), the output executable will be
|
|
|
|
# called MSCORE_OUTPUT_NAME instead of 'mscore'. This can be used to have MuseScore stable and unstable
|
|
|
|
# both installed in the same prefix on a Linux system.
|
2014-04-29 03:52:10 +02:00
|
|
|
if (MSCORE_OUTPUT_NAME)
|
2014-07-22 16:43:29 +02:00
|
|
|
set_target_properties(
|
|
|
|
${ExecutableName}
|
|
|
|
PROPERTIES
|
|
|
|
OUTPUT_NAME ${MSCORE_OUTPUT_NAME}
|
|
|
|
)
|
2014-04-29 03:52:10 +02:00
|
|
|
endif (MSCORE_OUTPUT_NAME)
|
|
|
|
|
2019-12-17 14:47:08 +01:00
|
|
|
target_include_directories(mscore PRIVATE
|
2019-12-04 10:11:14 +01:00
|
|
|
${PROJECT_SOURCE_DIR}
|
|
|
|
${PROJECT_SOURCE_DIR}/thirdparty
|
|
|
|
)
|
|
|
|
|
2020-08-31 14:16:44 +02:00
|
|
|
set(FREETYPE_LIB )
|
|
|
|
if (USE_SYSTEM_FREETYPE)
|
|
|
|
set(FREETYPE_LIB ${FREETYPE_LIBRARIES})
|
|
|
|
else (USE_SYSTEM_FREETYPE)
|
|
|
|
set(FREETYPE_LIB mscore_freetype)
|
|
|
|
endif (USE_SYSTEM_FREETYPE)
|
|
|
|
|
|
|
|
set(LINK_LIB
|
|
|
|
${FREETYPE_LIB}
|
|
|
|
${QT_LIBRARIES}
|
|
|
|
awl
|
|
|
|
global
|
|
|
|
ui
|
|
|
|
uicomponents
|
|
|
|
fonts
|
|
|
|
system
|
|
|
|
network
|
|
|
|
)
|
2013-04-02 20:46:07 +02:00
|
|
|
|
2020-09-04 10:30:04 +02:00
|
|
|
if (BUILD_TELEMETRY_MODULE)
|
|
|
|
set(LINK_LIB ${LINK_LIB} telemetry)
|
|
|
|
endif(BUILD_TELEMETRY_MODULE)
|
|
|
|
|
2020-12-03 08:58:32 +01:00
|
|
|
set(LINK_LIB ${LINK_LIB}
|
|
|
|
actions
|
|
|
|
appshell
|
|
|
|
cloud
|
|
|
|
context
|
|
|
|
shortcuts
|
|
|
|
workspace
|
|
|
|
mu4_audio
|
|
|
|
mu4_midi
|
|
|
|
midi_old
|
|
|
|
userscores
|
|
|
|
extensions
|
|
|
|
languages
|
|
|
|
importexport
|
|
|
|
notation
|
|
|
|
commonscene
|
|
|
|
palette
|
|
|
|
inspector
|
|
|
|
playback
|
|
|
|
instruments
|
|
|
|
plugins
|
2020-08-31 14:16:44 +02:00
|
|
|
)
|
2020-12-03 08:58:32 +01:00
|
|
|
|
|
|
|
if (BUILD_VST)
|
|
|
|
set(LINK_LIB ${LINK_LIB} vst)
|
|
|
|
endif(BUILD_VST)
|
|
|
|
|
|
|
|
add_dependencies(mscore workspaces)
|
2020-08-31 14:16:44 +02:00
|
|
|
|
2020-04-25 18:50:24 +02:00
|
|
|
target_link_libraries(mscore ${LINK_LIB} )
|
2013-04-02 20:46:07 +02:00
|
|
|
|
2012-05-26 14:49:10 +02:00
|
|
|
if (APPLE)
|
|
|
|
set_target_properties (mscore
|
2014-07-22 16:43:29 +02:00
|
|
|
PROPERTIES
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST ${PROJECT_SOURCE_DIR}/build/MacOSXBundleInfo.plist.in)
|
2016-06-10 10:37:53 +02:00
|
|
|
# Enable dSym generation
|
2012-07-28 09:47:21 +02:00
|
|
|
#set_target_properties (mscore
|
2016-06-10 10:37:53 +02:00
|
|
|
# PROPERTIES
|
|
|
|
# XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym")
|
2016-12-20 21:57:13 +01:00
|
|
|
endif (APPLE)
|
2012-05-26 14:49:10 +02:00
|
|
|
|
2020-09-19 11:26:42 +02:00
|
|
|
include (${PROJECT_SOURCE_DIR}/build/CopyFilesMacros.cmake)
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
if (MINGW)
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${PROJECT_BINARY_DIR}/resfile.o
|
2019-12-18 21:40:24 +01:00
|
|
|
COMMAND ${CMAKE_RC_COMPILER} -i mscore.rc -o ${PROJECT_BINARY_DIR}/resfile.o
|
2020-12-02 20:42:39 +01:00
|
|
|
DEPENDS ${PROJECT_SOURCE_DIR}/main/res/mscore.rc
|
|
|
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/main/res
|
2012-05-26 14:49:10 +02:00
|
|
|
)
|
|
|
|
set_source_files_properties(
|
|
|
|
${PROJECT_BINARY_DIR}/resfile.o
|
|
|
|
PROPERTIES generated true
|
|
|
|
)
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
|
2016-06-10 10:37:53 +02:00
|
|
|
# Windows: Add -mconsole to LINK_FLAGS to get a console window for debug output
|
2012-05-26 14:49:10 +02:00
|
|
|
if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
|
|
|
|
set_target_properties( mscore
|
|
|
|
PROPERTIES
|
2013-03-14 16:00:06 +01:00
|
|
|
COMPILE_FLAGS "${PCH_INCLUDE} -g -Wall -Wextra -Winvalid-pch ${QT_DEFINITIONS} -DQT_SVG_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB"
|
2018-11-26 13:24:31 +01:00
|
|
|
LINK_FLAGS "-mwindows -mconsole -L ${QT_INSTALL_LIBS}"
|
2012-05-26 14:49:10 +02:00
|
|
|
)
|
|
|
|
else(CMAKE_BUILD_TYPE MATCHES "DEBUG")
|
|
|
|
set_target_properties( mscore
|
|
|
|
PROPERTIES
|
2013-03-14 16:00:06 +01:00
|
|
|
COMPILE_FLAGS "${PCH_INCLUDE} -Wall -Wextra -Winvalid-pch ${QT_DEFINITIONS} -DQT_SVG_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB"
|
2018-11-26 13:24:31 +01:00
|
|
|
LINK_FLAGS "-Wl,-S -mwindows -L ${QT_INSTALL_LIBS}"
|
2012-05-26 14:49:10 +02:00
|
|
|
)
|
|
|
|
endif(CMAKE_BUILD_TYPE MATCHES "DEBUG")
|
|
|
|
|
2016-01-04 02:36:36 +01:00
|
|
|
# Keep dependencies in alphabetical order. Changes made to this list
|
|
|
|
# might need to be made in "build/Linux+BSD/portable/copy-libs" too.
|
2017-06-19 11:55:54 +02:00
|
|
|
get_filename_component(COMPILER_DIR ${CMAKE_CXX_COMPILER} DIRECTORY)
|
|
|
|
get_filename_component (MINGW_ROOT ${COMPILER_DIR} DIRECTORY)
|
2017-08-01 22:47:04 +02:00
|
|
|
foreach (QtLibrary ${QT_LIBRARIES})
|
2018-01-05 00:26:31 +01:00
|
|
|
message("Library ${QtLibrary}")
|
|
|
|
# always use release libs
|
|
|
|
set_target_properties(${QtLibrary} PROPERTIES MAP_IMPORTED_CONFIG_DEBUG "RELEASE")
|
|
|
|
get_target_property(QtSharedLibrary ${QtLibrary} LOCATION_RELEASE)
|
2017-08-01 22:47:04 +02:00
|
|
|
if (EXISTS ${QtSharedLibrary})
|
|
|
|
list (APPEND QtInstallLibraries ${QtSharedLibrary})
|
|
|
|
endif (EXISTS ${QtSharedLibrary})
|
|
|
|
endforeach (QtLibrary ${QT_LIBRARIES})
|
|
|
|
list(REMOVE_DUPLICATES QtInstallLibraries)
|
2018-01-05 00:26:31 +01:00
|
|
|
|
2019-12-18 21:40:24 +01:00
|
|
|
# target_link_libraries(mscore ${QT_LIBRARIES})
|
2018-01-05 00:26:31 +01:00
|
|
|
|
|
|
|
install( TARGETS mscore RUNTIME DESTINATION bin )
|
|
|
|
|
2018-10-14 23:14:23 +02:00
|
|
|
if (BUILD_64)
|
|
|
|
install( FILES
|
|
|
|
${MINGW_ROOT}/bin/libgcc_s_seh-1.dll
|
2020-10-18 20:00:47 +02:00
|
|
|
${DEPENDENCIES_DIR}/libcrypto-1_1-x64.dll
|
|
|
|
${DEPENDENCIES_DIR}/libssl-1_1-x64.dll
|
2018-10-14 23:14:23 +02:00
|
|
|
DESTINATION bin)
|
|
|
|
else (BUILD_64)
|
|
|
|
install( FILES
|
|
|
|
${MINGW_ROOT}/bin/libgcc_s_dw2-1.dll
|
2020-10-18 20:00:47 +02:00
|
|
|
${DEPENDENCIES_DIR}/libcrypto-1_1.dll
|
|
|
|
${DEPENDENCIES_DIR}/libssl-1_1.dll
|
2018-10-14 23:14:23 +02:00
|
|
|
DESTINATION bin)
|
|
|
|
endif (BUILD_64)
|
|
|
|
|
2013-07-13 12:20:34 +02:00
|
|
|
install( FILES
|
2017-06-19 11:55:54 +02:00
|
|
|
${MINGW_ROOT}/bin/libstdc++-6.dll
|
|
|
|
${MINGW_ROOT}/bin/libwinpthread-1.dll
|
2020-08-24 20:49:17 +02:00
|
|
|
${OGG_LIBRARY}
|
|
|
|
${SNDFILE_LIBRARY}
|
|
|
|
${VORBIS_LIBRARY}
|
|
|
|
${VORBISFILE_LIBRARY}
|
|
|
|
${PORTAUDIO_LIBRARY}
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_BINS}/libEGL.dll
|
|
|
|
${QT_INSTALL_BINS}/libGLESv2.dll
|
2019-04-16 18:59:28 +02:00
|
|
|
${QT_INSTALL_BINS}/opengl32sw.dll
|
2019-12-02 11:21:58 +01:00
|
|
|
${QT_INSTALL_BINS}/d3dcompiler_47.dll
|
2017-08-01 22:47:04 +02:00
|
|
|
${QtInstallLibraries}
|
2014-07-15 14:36:55 +02:00
|
|
|
${PROJECT_SOURCE_DIR}/build/qt.conf
|
2020-10-18 20:00:47 +02:00
|
|
|
${QT_INSTALL_BINS}/Qt5QmlModels.dll
|
|
|
|
${QT_INSTALL_BINS}/Qt5QmlWorkerScript.dll
|
2013-07-13 12:20:34 +02:00
|
|
|
DESTINATION bin)
|
|
|
|
|
2018-02-27 17:35:11 +01:00
|
|
|
install (FILES
|
2018-11-08 16:28:20 +01:00
|
|
|
${DEPENDENCIES_DIR}/lame_enc.dll
|
2018-02-27 17:35:11 +01:00
|
|
|
DESTINATION bin
|
|
|
|
OPTIONAL)
|
|
|
|
|
2013-07-13 12:20:34 +02:00
|
|
|
install(FILES
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_PLUGINS}/iconengines/qsvgicon.dll
|
2013-07-13 12:20:34 +02:00
|
|
|
DESTINATION bin/iconengines)
|
|
|
|
|
|
|
|
install(FILES
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_PLUGINS}/imageformats/qjpeg.dll
|
|
|
|
${QT_INSTALL_PLUGINS}/imageformats/qsvg.dll
|
|
|
|
${QT_INSTALL_PLUGINS}/imageformats/qtiff.dll
|
2013-07-13 12:20:34 +02:00
|
|
|
DESTINATION bin/imageformats)
|
|
|
|
|
|
|
|
install(FILES
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_PLUGINS}/platforms/qwindows.dll
|
2013-07-13 12:20:34 +02:00
|
|
|
DESTINATION bin/platforms)
|
|
|
|
|
2013-07-17 10:02:21 +02:00
|
|
|
install(FILES
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_PLUGINS}/printsupport/windowsprintersupport.dll
|
2013-07-17 10:02:21 +02:00
|
|
|
DESTINATION bin/printsupport)
|
|
|
|
|
2015-02-06 18:59:57 +01:00
|
|
|
install(FILES
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_PLUGINS}/sqldrivers/qsqlite.dll
|
2015-02-06 18:59:57 +01:00
|
|
|
DESTINATION bin/sqldrivers)
|
|
|
|
|
2013-07-13 12:20:34 +02:00
|
|
|
install(DIRECTORY
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_QML}
|
2013-07-13 12:20:34 +02:00
|
|
|
DESTINATION .
|
2016-01-04 02:36:36 +01:00
|
|
|
REGEX ".*d\\.dll" EXCLUDE
|
2013-07-15 18:48:57 +02:00
|
|
|
REGEX ".*QtMultimedia.*" EXCLUDE
|
2016-01-04 02:36:36 +01:00
|
|
|
REGEX ".*QtSensors.*" EXCLUDE
|
|
|
|
REGEX ".*QtTest.*" EXCLUDE
|
|
|
|
REGEX ".*QtWebkit.*" EXCLUDE)
|
2012-05-26 14:49:10 +02:00
|
|
|
|
|
|
|
else (MINGW)
|
2018-07-10 14:57:05 +02:00
|
|
|
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
if ( NOT MSVC )
|
2019-12-04 10:11:14 +01:00
|
|
|
## install qwebengine core
|
2018-08-20 14:37:14 +02:00
|
|
|
if (NOT APPLE AND USE_WEBENGINE)
|
2019-07-11 06:28:20 +02:00
|
|
|
install(PROGRAMS
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_LIBEXECS}/QtWebEngineProcess
|
2018-07-10 14:57:05 +02:00
|
|
|
DESTINATION bin
|
|
|
|
)
|
|
|
|
install(DIRECTORY
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_DATA}/resources
|
2018-08-08 09:42:12 +02:00
|
|
|
DESTINATION lib/qt5
|
2018-07-10 14:57:05 +02:00
|
|
|
)
|
|
|
|
install(DIRECTORY
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_TRANSLATIONS}/qtwebengine_locales
|
2018-08-08 09:42:12 +02:00
|
|
|
DESTINATION lib/qt5/translations
|
2018-07-10 14:57:05 +02:00
|
|
|
)
|
2018-08-20 14:37:14 +02:00
|
|
|
endif(NOT APPLE AND USE_WEBENGINE)
|
2018-07-10 14:57:05 +02:00
|
|
|
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
set_target_properties (
|
|
|
|
mscore
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_FLAGS "${PCH_INCLUDE} -g -Wall -Wno-overloaded-virtual -Winvalid-pch"
|
|
|
|
)
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
target_link_libraries(mscore ${OsxFrameworks})
|
|
|
|
else (APPLE)
|
|
|
|
target_link_libraries(mscore rt)
|
|
|
|
endif (APPLE)
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
set_target_properties(mscore
|
|
|
|
PROPERTIES
|
|
|
|
LINK_FLAGS "-stdlib=libc++"
|
|
|
|
)
|
2019-12-17 14:47:08 +01:00
|
|
|
xcode_pch(mscore all)
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
install (TARGETS mscore BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX})
|
2020-12-02 10:51:41 +01:00
|
|
|
install (FILES "${PROJECT_SOURCE_DIR}/main/res/mscore.icns" DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME})
|
|
|
|
install (FILES "${PROJECT_SOURCE_DIR}/main/res/musescoreDocument.icns" DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME})
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
else (APPLE)
|
|
|
|
#### PACKAGING for Linux and BSD based systems (more in top-level CMakeLists.txt) ####
|
|
|
|
# Install mscore executable (package maintainers may add "MuseScore" and/or "musescore" aliases that symlink to mscore)
|
|
|
|
install( TARGETS mscore RUNTIME DESTINATION bin )
|
|
|
|
if (LN_EXECUTABLE)
|
|
|
|
add_custom_target(mscore_alias ALL
|
|
|
|
COMMAND echo "Creating symlink alias for mscore executable."
|
|
|
|
COMMAND ${LN_EXECUTABLE} -sf "mscore${MSCORE_INSTALL_SUFFIX}" "musescore${MSCORE_INSTALL_SUFFIX}"
|
|
|
|
COMMAND echo 'Symlink alias: musescore${MSCORE_INSTALL_SUFFIX} -> mscore${MSCORE_INSTALL_SUFFIX}'
|
|
|
|
)
|
2019-12-04 10:11:14 +01:00
|
|
|
install( FILES ${PROJECT_BINARY_DIR}/main/musescore${MSCORE_INSTALL_SUFFIX} DESTINATION bin)
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
else (LN_EXECUTABLE)
|
|
|
|
add_custom_target(mscore_alias ALL
|
|
|
|
COMMAND echo "No symlink aliases will be created."
|
|
|
|
VERBATIM
|
|
|
|
)
|
|
|
|
endif (LN_EXECUTABLE)
|
|
|
|
# Install MuseScore icons (use SVGs where possible, but install PNGs as backup for systems that don't support SVG)
|
2018-12-20 19:45:02 +01:00
|
|
|
set(MSCORE_ICON_BASE ../assets/musescore-icon-round)
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
install(FILES ${MSCORE_ICON_BASE}.svg RENAME mscore${MSCORE_INSTALL_SUFFIX}.svg DESTINATION share/icons/hicolor/scalable/apps)
|
|
|
|
install(FILES ${MSCORE_ICON_BASE}-16.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/16x16/apps)
|
|
|
|
install(FILES ${MSCORE_ICON_BASE}-24.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/24x24/apps)
|
|
|
|
install(FILES ${MSCORE_ICON_BASE}-32.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/32x32/apps)
|
|
|
|
install(FILES ${MSCORE_ICON_BASE}-48.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/48x48/apps)
|
|
|
|
install(FILES ${MSCORE_ICON_BASE}-64.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/64x64/apps)
|
|
|
|
install(FILES ${MSCORE_ICON_BASE}-96.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/96x96/apps)
|
|
|
|
install(FILES ${MSCORE_ICON_BASE}-128.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/128x128/apps)
|
|
|
|
install(FILES ${MSCORE_ICON_BASE}-512.png RENAME mscore${MSCORE_INSTALL_SUFFIX}.png DESTINATION share/icons/hicolor/512x512/apps)
|
|
|
|
# Install MIME (filetype) icons for each mimetype on Linux
|
|
|
|
install( FILES ../assets/mscz-icon.svg RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}.svg
|
|
|
|
DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .MSCZ files
|
|
|
|
install( FILES ../assets/mscz-icon-48.png RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}.png
|
|
|
|
DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .MSCZ files
|
|
|
|
install( FILES ../assets/mscx-icon.svg RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}+xml.svg
|
|
|
|
DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .MSCX files
|
|
|
|
install( FILES ../assets/mscx-icon-48.png RENAME application-x-musescore${MSCORE_INSTALL_SUFFIX}+xml.png
|
|
|
|
DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .MSCX files
|
|
|
|
# use a custom icon for MusicXML files (there isn't a standard icon for MusicXML files)
|
|
|
|
install( FILES ../assets/mxl-icon.svg RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}.svg
|
|
|
|
DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .MXL (compressed MusicXML) files
|
|
|
|
install( FILES ../assets/mxl-icon-48.png RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}.png
|
|
|
|
DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .MXL (compressed MusicXML) files
|
|
|
|
install( FILES ../assets/xml-icon.svg RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}+xml.svg
|
|
|
|
DESTINATION share/icons/hicolor/scalable/mimetypes) # SVG icon for .XML (MusicXML) files
|
|
|
|
install( FILES ../assets/xml-icon-48.png RENAME application-vnd.recordare.musicxml${MSCORE_INSTALL_SUFFIX}+xml.png
|
|
|
|
DESTINATION share/icons/hicolor/48x48/mimetypes) # PNG icon for .XML (MusicXML) files
|
|
|
|
# Note: Must now run "gtk-update-icon-cache" to set the new icons. This is done in the Makefile.
|
|
|
|
endif (APPLE)
|
|
|
|
else ( NOT MSVC )
|
|
|
|
# Microsoft Visual Studio-specific starts here!
|
|
|
|
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
|
|
|
|
|
|
|
|
# Create list of directories to search for libraries
|
|
|
|
foreach (item ${CMAKE_LIBRARY_PATH})
|
|
|
|
string( APPEND all_library_paths " /LIBPATH:${item}" )
|
|
|
|
endforeach()
|
|
|
|
|
2018-08-29 10:10:45 +02:00
|
|
|
# Windows: Add /SUBSYSTEM:WINDOWS to LINK_FLAGS to avoid a console window in release
|
2019-02-26 10:27:28 +01:00
|
|
|
if(CMAKE_BUILD_TYPE MATCHES "REL*")
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
set_target_properties( mscore
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_FLAGS "${PCH_INCLUDE} ${QT_DEFINITIONS} -DQT_SVG_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB"
|
2018-11-26 13:24:31 +01:00
|
|
|
LINK_FLAGS "/LIBPATH:${QT_INSTALL_LIBS} ${all_library_paths}"
|
2018-08-29 10:10:45 +02:00
|
|
|
LINK_FLAGS "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup"
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
)
|
2019-02-26 10:27:28 +01:00
|
|
|
else(CMAKE_BUILD_TYPE MATCHES "REL*")
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
set_target_properties( mscore
|
|
|
|
PROPERTIES
|
2018-08-29 10:10:45 +02:00
|
|
|
COMPILE_FLAGS "${PCH_INCLUDE} ${QT_DEFINITIONS} /DQT_SVG_LIB /DQT_GUI_LIB /DQT_XML_LIB /DQT_CORE_LIB"
|
2018-11-26 13:24:31 +01:00
|
|
|
LINK_FLAGS "/LIBPATH:${QT_INSTALL_LIBS} ${all_library_paths}"
|
2018-08-29 10:10:45 +02:00
|
|
|
LINK_FLAGS "/SUBSYSTEM:CONSOLE"
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
)
|
2019-02-26 10:27:28 +01:00
|
|
|
endif(CMAKE_BUILD_TYPE MATCHES "REL*")
|
2018-07-10 14:57:05 +02:00
|
|
|
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
# Copy DLL dependencies to .EXE DIRECTORY
|
2018-08-08 14:16:17 +02:00
|
|
|
list(APPEND dlls_to_copy
|
2018-11-26 13:24:31 +01:00
|
|
|
"${QT_INSTALL_BINS}/Qt5Core.dll" "${QT_INSTALL_BINS}/Qt5Gui.dll" "${QT_INSTALL_BINS}/Qt5Help.dll"
|
|
|
|
"${QT_INSTALL_BINS}/Qt5Network.dll" "${QT_INSTALL_BINS}/Qt5PrintSupport.dll"
|
|
|
|
"${QT_INSTALL_BINS}/Qt5Qml.dll" "${QT_INSTALL_BINS}/Qt5Quick.dll" "${QT_INSTALL_BINS}/Qt5Sql.dll"
|
2019-08-31 17:23:47 +02:00
|
|
|
"${QT_INSTALL_BINS}/Qt5QuickControls2.dll" "${QT_INSTALL_BINS}/Qt5QuickTemplates2.dll"
|
2018-11-26 13:24:31 +01:00
|
|
|
"${QT_INSTALL_BINS}/Qt5Svg.dll" "${QT_INSTALL_BINS}/Qt5Widgets.dll" "${QT_INSTALL_BINS}/Qt5Xml.dll"
|
|
|
|
"${QT_INSTALL_BINS}/Qt5XmlPatterns.dll"
|
|
|
|
"${QT_INSTALL_BINS}/Qt5WebChannel.dll"
|
|
|
|
"${QT_INSTALL_BINS}/Qt5QuickWidgets.dll" "${QT_INSTALL_BINS}/Qt5Positioning.dll"
|
2019-04-16 18:59:28 +02:00
|
|
|
"${QT_INSTALL_BINS}/libEGL.dll" "${QT_INSTALL_BINS}/libGLESv2.dll" "${QT_INSTALL_BINS}/opengl32sw.dll"
|
2019-12-02 11:21:58 +01:00
|
|
|
"${QT_INSTALL_BINS}/d3dcompiler_47.dll"
|
2020-10-18 20:00:47 +02:00
|
|
|
"${QT_INSTALL_BINS}/Qt5QmlModels.dll"
|
|
|
|
"${QT_INSTALL_BINS}/Qt5QmlWorkerScript.dll"
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
)
|
2018-08-20 14:37:14 +02:00
|
|
|
if (USE_WEBENGINE)
|
2018-11-26 13:24:31 +01:00
|
|
|
list(APPEND dlls_to_copy "${QT_INSTALL_BINS}/Qt5WebEngineWidgets.dll" "${QT_INSTALL_BINS}/Qt5WebEngineCore.dll")
|
2018-08-20 14:37:14 +02:00
|
|
|
endif(USE_WEBENGINE)
|
2020-10-15 11:51:51 +02:00
|
|
|
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
set(CMAKE_FIND_LIBRARY_PREFIX "")
|
|
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
|
2018-10-27 08:13:15 +02:00
|
|
|
|
|
|
|
if (WIN_SPARKLE_ENABLED)
|
|
|
|
find_library( dll_winsparkle NAMES "WinSparkle" PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH)
|
|
|
|
list(APPEND dlls_to_copy ${dll_winsparkle})
|
|
|
|
endif (WIN_SPARKLE_ENABLED)
|
|
|
|
|
2018-08-23 16:50:57 +02:00
|
|
|
find_library( dll_lame NAMES "lame_enc" PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH)
|
|
|
|
find_library( dll_ogg NAMES "libogg" PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH)
|
2020-08-24 20:49:17 +02:00
|
|
|
find_library( dll_sndfile NAMES "sndfile" "libsndfile-1" PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH)
|
2018-08-23 16:50:57 +02:00
|
|
|
find_library( dll_vorbis NAMES "libvorbis" PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH)
|
|
|
|
find_library( dll_vorbisfile NAMES "libvorbisfile" PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH)
|
|
|
|
find_library( dll_portaudio NAMES "portaudio" PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH)
|
2020-10-18 20:00:47 +02:00
|
|
|
find_library( dll_ssl1 NAMES "libcrypto-1_1-x64" "libcrypto-1_1" PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH)
|
|
|
|
find_library( dll_ssl2 NAMES "libssl-1_1-x64" "libssl-1_1" PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH)
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
|
2018-12-04 13:47:28 +01:00
|
|
|
list(APPEND dlls_to_copy ${dll_lame} ${dll_ogg} ${dll_sndfile} ${dll_vorbis} ${dll_vorbisfile} ${dll_portaudio} ${dll_ssl1} ${dll_ssl2} "$<TARGET_FILE_DIR:mscore>/${MSCORE_OUTPUT_NAME}.exe")
|
2020-10-14 17:15:56 +02:00
|
|
|
set( output_dir_for_dlls "${CMAKE_INSTALL_PREFIX}/bin")
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
|
|
|
|
COPY_FILES_INTO_DIRECTORY_IF_CHANGED( "${dlls_to_copy}" ${output_dir_for_dlls} mscore)
|
|
|
|
|
|
|
|
# Keep dependencies in alphabetical order. Changes made to this list
|
|
|
|
# might need to be made in "build/Linux+BSD/portable/copy-libs" too.
|
|
|
|
get_filename_component(COMPILER_DIR ${CMAKE_CXX_COMPILER} DIRECTORY)
|
|
|
|
get_filename_component (MINGW_ROOT ${COMPILER_DIR} DIRECTORY)
|
2018-07-10 14:57:05 +02:00
|
|
|
|
2018-10-27 08:13:15 +02:00
|
|
|
foreach (QtLibrary ${QT_LIBRARIES})
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
message("Library ${QtLibrary}")
|
|
|
|
# always use release libs
|
|
|
|
set_target_properties(${QtLibrary} PROPERTIES MAP_IMPORTED_CONFIG_DEBUG "RELEASE")
|
|
|
|
get_target_property(QtSharedLibrary ${QtLibrary} LOCATION_RELEASE)
|
|
|
|
if (EXISTS ${QtSharedLibrary})
|
|
|
|
list (APPEND QtInstallLibraries ${QtSharedLibrary})
|
|
|
|
endif (EXISTS ${QtSharedLibrary})
|
|
|
|
endforeach (QtLibrary ${QT_LIBRARIES})
|
|
|
|
list(REMOVE_DUPLICATES QtInstallLibraries)
|
2018-08-08 14:16:17 +02:00
|
|
|
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
target_link_libraries(mscore ${QT_LIBRARIES})
|
2018-08-08 10:47:01 +02:00
|
|
|
add_dependencies(mscore lrelease)
|
2018-07-10 14:57:05 +02:00
|
|
|
|
|
|
|
install( FILES
|
2018-10-27 08:13:15 +02:00
|
|
|
${dll_ogg}
|
|
|
|
${dll_lame}
|
|
|
|
${dll_sndfile}
|
|
|
|
${dll_portaudio}
|
|
|
|
${dll_vorbis}
|
|
|
|
${dll_vorbisfile}
|
2018-12-04 13:47:28 +01:00
|
|
|
${dll_ssl1}
|
|
|
|
${dll_ssl2}
|
2018-10-27 08:13:15 +02:00
|
|
|
${dll_winsparkle}
|
|
|
|
${QtInstallLibraries}
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_BINS}/libEGL.dll
|
|
|
|
${QT_INSTALL_BINS}/libGLESv2.dll
|
2019-04-16 18:59:28 +02:00
|
|
|
${QT_INSTALL_BINS}/opengl32sw.dll
|
2019-12-02 11:21:58 +01:00
|
|
|
${QT_INSTALL_BINS}/d3dcompiler_47.dll
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_BINS}/Qt5Positioning.dll
|
|
|
|
${QT_INSTALL_BINS}/Qt5WebChannel.dll
|
2019-11-13 20:07:27 +01:00
|
|
|
${QT_INSTALL_BINS}/Qt5QuickTemplates2.dll
|
2020-10-15 11:51:51 +02:00
|
|
|
${QT_INSTALL_BINS}/Qt5QmlModels.dll
|
|
|
|
${QT_INSTALL_BINS}/Qt5QmlWorkerScript.dll
|
2018-10-27 08:13:15 +02:00
|
|
|
${PROJECT_SOURCE_DIR}/build/qt.conf
|
|
|
|
DESTINATION bin)
|
2018-07-10 14:57:05 +02:00
|
|
|
|
|
|
|
install(FILES
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_PLUGINS}/iconengines/qsvgicon.dll
|
2018-07-10 14:57:05 +02:00
|
|
|
DESTINATION bin/iconengines)
|
|
|
|
|
|
|
|
install(FILES
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_PLUGINS}/imageformats/qjpeg.dll
|
|
|
|
${QT_INSTALL_PLUGINS}/imageformats/qsvg.dll
|
|
|
|
${QT_INSTALL_PLUGINS}/imageformats/qtiff.dll
|
2018-07-10 14:57:05 +02:00
|
|
|
DESTINATION bin/imageformats)
|
|
|
|
|
|
|
|
install(FILES
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_PLUGINS}/platforms/qwindows.dll
|
2018-07-10 14:57:05 +02:00
|
|
|
DESTINATION bin/platforms)
|
|
|
|
|
|
|
|
install(FILES
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_PLUGINS}/printsupport/windowsprintersupport.dll
|
2018-07-10 14:57:05 +02:00
|
|
|
DESTINATION bin/printsupport)
|
|
|
|
|
|
|
|
install(FILES
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_PLUGINS}/sqldrivers/qsqlite.dll
|
2018-07-10 14:57:05 +02:00
|
|
|
DESTINATION bin/sqldrivers)
|
2018-08-08 14:16:17 +02:00
|
|
|
|
2018-08-20 14:37:14 +02:00
|
|
|
install( TARGETS mscore RUNTIME DESTINATION bin ) # this duplicate due to the correctly package step
|
2018-07-10 14:57:05 +02:00
|
|
|
|
2018-08-20 14:37:14 +02:00
|
|
|
if (USE_WEBENGINE)
|
|
|
|
install(FILES
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_LIBEXECS}/QtWebEngineProcess.exe
|
2018-08-20 14:37:14 +02:00
|
|
|
DESTINATION bin
|
|
|
|
)
|
|
|
|
install(DIRECTORY
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_DATA}/resources
|
2018-08-20 14:37:14 +02:00
|
|
|
DESTINATION bin/webengineresources
|
|
|
|
)
|
|
|
|
install(DIRECTORY
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_TRANSLATIONS}/qtwebengine_locales
|
2018-08-20 14:37:14 +02:00
|
|
|
DESTINATION bin/webengineresources/translations
|
|
|
|
)
|
|
|
|
endif (USE_WEBENGINE)
|
2018-09-21 13:45:12 +02:00
|
|
|
|
2018-07-10 14:57:05 +02:00
|
|
|
install(DIRECTORY
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_QML}
|
2018-07-10 14:57:05 +02:00
|
|
|
DESTINATION .
|
|
|
|
REGEX ".*d\\.dll" EXCLUDE
|
2018-08-20 14:37:14 +02:00
|
|
|
REGEX ".pdb" EXCLUDE
|
2018-07-10 14:57:05 +02:00
|
|
|
REGEX ".*QtMultimedia.*" EXCLUDE
|
|
|
|
REGEX ".*QtSensors.*" EXCLUDE
|
|
|
|
REGEX ".*QtTest.*" EXCLUDE
|
2018-08-20 14:37:14 +02:00
|
|
|
REGEX ".*QtWebkit.*" EXCLUDE
|
|
|
|
)
|
2018-08-08 14:16:17 +02:00
|
|
|
|
2020-10-14 17:15:56 +02:00
|
|
|
if (WIN_PORTABLE)
|
|
|
|
# deploy the files and directory structure needed for the PortableApps.com format
|
|
|
|
install(DIRECTORY ../build/PortableApps/App DESTINATION ${CMAKE_INSTALL_PREFIX}/../..)
|
|
|
|
install(DIRECTORY ../build/PortableApps/Other DESTINATION ${CMAKE_INSTALL_PREFIX}/../..)
|
|
|
|
install(FILES ../build/PortableApps/help.html DESTINATION ${CMAKE_INSTALL_PREFIX}/../..)
|
|
|
|
set(MSCORE_ICON_BASE ../assets/musescore-icon-round)
|
|
|
|
configure_file(../build/PortableApps/appinfo.ini.in ${CMAKE_INSTALL_PREFIX}/../../App/AppInfo/appinfo.ini @ONLY)
|
|
|
|
install(FILES ../mscore/data/mscore.ico RENAME appicon.ico DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo)
|
|
|
|
install(FILES ${MSCORE_ICON_BASE}-16.png RENAME appicon_16.png DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo)
|
|
|
|
install(FILES ${MSCORE_ICON_BASE}-32.png RENAME appicon_32.png DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo)
|
|
|
|
install(FILES ${MSCORE_ICON_BASE}-128.png RENAME appicon_128.png DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo)
|
|
|
|
install( FILES ../assets/mscz-icon.ico RENAME mscz.ico DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo/FileTypeIcons) # icon for .MSCZ files
|
|
|
|
install( FILES ../assets/mscz-icon-48.png RENAME mscz_48.png DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo/FileTypeIcons) # PNG icon for .MSCZ files
|
|
|
|
install( FILES ../assets/mscx-icon.ico RENAME mscx.ico DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo/FileTypeIcons) # icon for .MSCX files
|
|
|
|
install( FILES ../assets/mscx-icon-48.png RENAME mscx_48.png DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo/FileTypeIcons) # PNG icon for .MSCX files
|
|
|
|
# use a custom icon for MusicXML files (there isn't a standard icon for MusicXML files)
|
|
|
|
# install( FILES ../assets/mxl-icon.svg RENAME mxl.svg DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo/FileTypeIcons) # SVG icon for .MXL (compressed MusicXML) files
|
|
|
|
# install( FILES ../assets/mxl-icon-48.png RENAME mxl_48.png DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo/FileTypeIcons) # PNG icon for .MXL (compressed MusicXML) files
|
|
|
|
# install( FILES ../assets/xml-icon.svg RENAME xml.svg DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo/FileTypeIcons) # SVG icon for .XML (MusicXML) files
|
|
|
|
# install( FILES ../assets/xml-icon-48.png RENAME xml_48.png DESTINATION ${CMAKE_INSTALL_PREFIX}/../AppInfo/FileTypeIcons) # PNG icon for .XML (MusicXML) files
|
|
|
|
endif (WIN_PORTABLE)
|
2018-08-08 14:16:17 +02:00
|
|
|
|
This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
x Setting target properties for MSVC
x Using all.h in source dir
x Adding pre-compiled headers to target
x Removing dependency from mops1 and mops2
Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-05-01 17:48:42 +02:00
|
|
|
endif ( NOT MSVC )
|
2012-05-26 14:49:10 +02:00
|
|
|
endif (MINGW)
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
install (FILES
|
2014-12-19 17:26:41 +01:00
|
|
|
../fonts/gootville/GootvilleText.otf
|
2014-07-23 17:51:00 +02:00
|
|
|
../fonts/mscore/MScoreText.ttf
|
2020-04-24 16:51:13 +02:00
|
|
|
../fonts/mscore/MusescoreIcon.ttf
|
2016-10-26 20:36:47 +02:00
|
|
|
../fonts/musejazz/MuseJazzText.otf
|
2019-08-01 21:58:06 +02:00
|
|
|
../fonts/campania/Campania.otf
|
2014-01-22 16:19:54 +01:00
|
|
|
../fonts/FreeSerif.ttf
|
2014-03-04 10:08:00 +01:00
|
|
|
../fonts/FreeSerifBold.ttf
|
2015-04-15 14:10:07 +02:00
|
|
|
../fonts/FreeSerifItalic.ttf
|
|
|
|
../fonts/FreeSerifBoldItalic.ttf
|
2012-05-26 14:49:10 +02:00
|
|
|
../fonts/FreeSans.ttf
|
2012-08-16 12:12:55 +02:00
|
|
|
../fonts/mscoreTab.ttf
|
2012-05-26 14:49:10 +02:00
|
|
|
../fonts/mscore-BC.ttf
|
2014-07-23 15:32:34 +02:00
|
|
|
../fonts/bravura/BravuraText.otf
|
2020-09-21 12:48:49 +02:00
|
|
|
../fonts/leland/Leland.otf
|
2020-08-23 09:22:26 +02:00
|
|
|
../fonts/petaluma/PetalumaText.otf
|
|
|
|
../fonts/petaluma/PetalumaScript.otf
|
2012-05-26 14:49:10 +02:00
|
|
|
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}fonts
|
|
|
|
)
|
2013-07-20 11:15:56 +02:00
|
|
|
install(DIRECTORY
|
2018-11-26 13:24:31 +01:00
|
|
|
${QT_INSTALL_QML}
|
2013-07-20 11:15:56 +02:00
|
|
|
DESTINATION ${Mscore_SHARE_NAME}${Mscore_INSTALL_NAME}
|
|
|
|
REGEX ".*QtWebkit.*" EXCLUDE
|
|
|
|
REGEX ".*QtTest.*" EXCLUDE
|
|
|
|
REGEX ".*QtSensors.*" EXCLUDE
|
|
|
|
REGEX ".*QtMultimedia.*" EXCLUDE
|
|
|
|
REGEX ".*QtAudioEngine.*" EXCLUDE
|
|
|
|
REGEX ".*_debug\\.dylib" EXCLUDE)
|
2012-05-26 14:49:10 +02:00
|
|
|
endif (APPLE)
|
|
|
|
|
2019-02-15 13:26:32 +01:00
|
|
|
|
|
|
|
if (MSCORE_OUTPUT_NAME)
|
|
|
|
set (MSCORE_EXECUTABLE_NAME ${MSCORE_OUTPUT_NAME})
|
|
|
|
else (MSCORE_OUTPUT_NAME)
|
|
|
|
set (MSCORE_EXECUTABLE_NAME ${ExecutableName})
|
|
|
|
endif (MSCORE_OUTPUT_NAME)
|
|
|
|
set (MSCORE_EXECUTABLE_NAME "${MSCORE_EXECUTABLE_NAME}" PARENT_SCOPE)
|