diff --git a/CMakeLists.txt b/CMakeLists.txt index 52814009c..9fdda2df9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,7 +174,6 @@ find_package( BZip2 ) find_package( JPEG ) find_package( VPX ) find_package( ZLIB ) -find_package( ZMusic ) include( TargetArch ) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index eca3e9e35..ce3d85821 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -407,6 +407,12 @@ endif() # ZMUSIC +if( MSVC ) + find_package( ZMusic ) +else() + find_package( ZMusic REQUIRED ) +endif() + if( MSVC AND NOT ZMUSIC_FOUND ) # Use prebuilt library set( ZMUSIC_ROOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../bin/windows/zmusic" )