Skip to content

Commit

Permalink
Adjust position for FATAL_ERROR_MISSING_ENV()
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Oct 18, 2023
1 parent c2f2f64 commit 0a38162
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1680,13 +1680,22 @@ endif()

# The mixxx executable
if(QT6)
find_package(Qt6 REQUIRED COMPONENTS Core) # For Qt Core cmake functions
find_package(Qt6 COMPONENTS Core) # For Qt Core cmake functions
# This is the first package form the environment, if this fails give hints how to install the environment
if(NOT Qt6_FOUND)
FATAL_ERROR_MISSING_ENV()
endif()
# qt_add_executable() is the recommended initial call for qt_finalize_target()
# below that takes care of the correct object order in the resulting binary
# According to https://doc.qt.io/qt-6/qt-finalize-target.html it is importand for
# builds with Qt < 3.21
qt_add_executable(mixxx WIN32 src/main.cpp MANUAL_FINALIZATION)
else()
find_package(Qt5 COMPONENTS Core) # For Qt Core cmake functions
# This is the first package form the environment, if this fails give hints how to install the environment
if(NOT Qt5_FOUND)
FATAL_ERROR_MISSING_ENV()
endif()
add_executable(mixxx WIN32 src/main.cpp)
endif()
# ugly hack to get #include "preferences/dialog/ui_dlgpreferencesdlg.h" to work in
Expand Down Expand Up @@ -2231,13 +2240,8 @@ if(WIN32)
endif()

# Chromaprint
find_package(Chromaprint)
# This is the first package form the environment, if this fails give hints how to install the environment
if(NOT Chromaprint_FOUND)
FATAL_ERROR_MISSING_ENV()
else()
target_link_libraries(mixxx-lib PRIVATE Chromaprint::Chromaprint)
endif()
find_package(Chromaprint REQUIRED)
target_link_libraries(mixxx-lib PRIVATE Chromaprint::Chromaprint)

# Locale Aware Compare for SQLite
find_package(SQLite3)
Expand Down

0 comments on commit 0a38162

Please sign in to comment.