Navigation Menu

Skip to content

Commit

Permalink
Try to fix Qt build on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlang committed Mar 17, 2016
1 parent 8573f98 commit 3255651
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Expand Up @@ -33,7 +33,7 @@ before_build:
- cmake -G "Visual Studio 14 2015" -Dbmc_USE_PYTHON=OFF -DBoost_DEBUG=1 -DBOOST_ROOT=C:\Libraries\boost_1_59_0 -DBOOST_INCLUDEDIR=C:\Libraries\boost_1_59_0 -DBOOST_LIBRARYDIR=C:\Libraries\boost_1_59_0\stage\lib -DBoost_PROGRAM_OPTIONS_LIBRARY_DEBUG=C:\Libraries\boost_1_59_0\stage\lib\libboost_program_options-vc140-mt-gd-1_59.lib -DBoost_PROGRAM_OPTIONS_LIBRARY_RELEASE=C:\Libraries\boost_1_59_0\stage\lib\libboost_program_options-vc140-mt-1_59.lib -DXercesC_INCLUDE_DIR="C:\Program Files (x86)\CodeSynthesis XSD 4.0\include" -DXercesC_LIBRARY_DEBUG="C:\Program Files (x86)\CodeSynthesis XSD 4.0\lib\vc-12.0\xerces-c_3D.lib" -DXercesC_LIBRARY_RELEASE="C:\Program Files (x86)\CodeSynthesis XSD 4.0\lib\vc-12.0\xerces-c_3.lib" -DXSDCXX_EXECUTABLE="C:\Program Files (x86)\CodeSynthesis XSD 4.0\bin\xsd.exe" -DXSDCXX_INCLUDE_DIR="C:\Program Files (x86)\CodeSynthesis XSD 4.0\include" .

build_script:
- msbuild bmc.sln /t:bmc_test /p:Configuration=Release
- msbuild bmc.sln /t:bmc,bmc-ui,bmc_test /p:Configuration=Release
- cd c:\projects\bmc\test
- Release\bmc_test.exe

28 changes: 15 additions & 13 deletions ui/qt/CMakeLists.txt
Expand Up @@ -6,7 +6,7 @@ find_package(Qt5 COMPONENTS Core Multimedia Svg Widgets Xml)
if(Qt5_FOUND)
qt5_add_resources(RESOURCES app.qrc)
configure_file(config.h.in config.h)
add_executable(bmc-ui MACOSX_BUNDLE WIN32
add_executable(bmc-ui MACOSX_BUNDLE
app.cpp
mainwindow.cpp mainwindow.h
lilypondsvgwidget.cpp lilypondsvgwidget.h
Expand All @@ -23,18 +23,20 @@ if(Qt5_FOUND)
BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION bin COMPONENT Runtime
)
set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/bmc-ui")
if(APPLE)
set(APPS "\${CMAKE_INSTALL_PREFIX}/bmc-ui.app")
elseif(MSVC)
set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/bmc-ui.exe")
endif()
set(DIRS ${QT_LIBRARY_DIRS})
install(CODE "
include(BundleUtilities)
set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle(\"${APPS}\" \"\" \"${DIRS}\")"
COMPONENT Runtime
)
set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/bmc-ui")
if(APPLE)
set(APPS "\${CMAKE_INSTALL_PREFIX}/bmc-ui.app")
elseif(MSVC)
set(APPS "\${CMAKE_INSTALL_PREFIX}/bin/bmc-ui.exe")
endif()
set(DIRS ${QT_LIBRARY_DIRS})
install(CODE "
include(BundleUtilities)
set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle(\"${APPS}\" \"\" \"${DIRS}\")"
COMPONENT Runtime
)
endif(APPLE)
endif()

0 comments on commit 3255651

Please sign in to comment.