From 524aeee63007fcc40902f807475b49c814f46213 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Thu, 15 Oct 2020 09:55:51 +0800 Subject: fix: missing link libraries path for windows build --- qmidiplayer-desktop/CMakeLists.txt | 10 ++++++++++ visualization/CMakeLists.txt | 6 +++--- visualization/renderer/CMakeLists.txt | 4 ++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/qmidiplayer-desktop/CMakeLists.txt b/qmidiplayer-desktop/CMakeLists.txt index 419bb05..4c6d23a 100644 --- a/qmidiplayer-desktop/CMakeLists.txt +++ b/qmidiplayer-desktop/CMakeLists.txt @@ -79,6 +79,16 @@ target_link_libraries(qmidiplayer ${CMAKE_DL_LIBS} ) +if(WIN32) + target_link_libraries(qmidiplayer winmm) +endif() + +target_link_directories(qmidiplayer +PRIVATE + ${fluidsynth_LIBRARY_DIRS} + ${rtmidi_LIBRARY_DIRS} +) + file(GLOB qmpdesktop_TS_FILES translations/*.ts) qt5_create_translation(qmpdesktop_QM_FILES ${qmpdesktop_SOURCES} ${qmpdesktop_TS_FILES}) add_custom_target(translations ALL DEPENDS ${qmpdesktop_QM_FILES}) diff --git a/visualization/CMakeLists.txt b/visualization/CMakeLists.txt index 6d474e0..ca1096c 100644 --- a/visualization/CMakeLists.txt +++ b/visualization/CMakeLists.txt @@ -13,8 +13,8 @@ if(WIN32) list(APPEND visualization_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/visualization.rc) endif(WIN32) -set(BUILD_DUMB ON) -set(BUILD_EXAMPLE OFF) +option(BUILD_DUMB "SMELT override: disable sound support" ON) +option(BUILD_EXAMPLE "SMELT override: build example" OFF) add_subdirectory(SMELT) add_subdirectory(renderer) @@ -41,7 +41,7 @@ target_link_libraries(visualization ${ZLIB_LIBRARIES} ${IL_LIBRARIES} glfw - ${GLEW_LIBRARIES} + GLEW::glew OpenGL::GL ) diff --git a/visualization/renderer/CMakeLists.txt b/visualization/renderer/CMakeLists.txt index 90a4704..bbd3daf 100644 --- a/visualization/renderer/CMakeLists.txt +++ b/visualization/renderer/CMakeLists.txt @@ -23,4 +23,8 @@ target_link_libraries(qmpvisrender ${CMAKE_DL_LIBS} ) +if(WIN32) + target_link_libraries(qmpvisrender winmm) +endif() + install(TARGETS qmpvisrender) -- cgit v1.2.3