Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@ __pycache__/

# Stuff from 3.x builds
/share/sound/MuseScore_General*

# User overrides of SetupBuildEnvironment
/buildscripts/cmake/SetupBuildEnvironment.user.cmake

7 changes: 7 additions & 0 deletions buildscripts/cmake/SetupBuildEnvironment.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ if(CC_IS_MSVC)
add_compile_definitions(_UNICODE UNICODE)
add_compile_definitions(_USE_MATH_DEFINES)
add_compile_definitions(NOMINMAX)

add_link_options("/NODEFAULTLIB:LIBCMT")
endif()

# MinGW-specific
Expand Down Expand Up @@ -111,3 +113,8 @@ endif(CC_IS_EMSCRIPTEN)

# Warnings
include(SetupCompileWarnings)

# User overrides
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SetupBuildEnvironment.user.cmake")
include(${CMAKE_CURRENT_LIST_DIR}/SetupBuildEnvironment.user.cmake)
endif()
14 changes: 14 additions & 0 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,20 @@ endif()
# Miscellaneous Microsoft Visual Studio settings
#################################################
if (MSVC)
# Add a post-build event to deploy the application to the output folder. Same as building the INSTALL target.
STRING(TOUPPER ${CMAKE_GENERATOR} UPPER_CMAKE_GENERATOR)
if (${UPPER_CMAKE_GENERATOR} MATCHES "VISUAL STUDIO")
# We want $(Configuration) passed verbatim. Note the round brackets.
set(CONFIG_STR "$(Configuration)")

add_custom_command(
TARGET MuseScoreStudio POST_BUILD
COMMAND ${CMAKE_COMMAND} -DBUILD_TYPE=${CONFIG_STR} -P cmake_install.cmake
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
VERBATIM
)
endif()

# Force the "install" and "package" targets not to depend on the "all" target.
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true)
set(CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@
#include "config.h"
#endif

// MuseScore change: moved these two includes before the others
// to avoid a "M_LN2 macro redefinition" warning in Visual Studio.
#include <cstdlib> // for malloc(), free()
#include <cstring> // for memcpy() etc.

#include "share/alloc.h"
#include "FLAC++/metadata.h"
#include "FLAC/assert.h"
#include <cstdlib> // for malloc(), free()
#include <cstring> // for memcpy() etc.

#ifdef _MSC_VER
// warning C4800: 'int' : forcing to bool 'true' or 'false' (performance warning)
Expand Down