Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Find Qt5 (if enabled) in ElementalConfig.cmake #275

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
19 changes: 16 additions & 3 deletions cmake/configure_files/ElementalConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,26 @@ IF(@MPC_FOUND@)
set(Elemental_INCLUDE_DIRS "${Elemental_INCLUDE_DIRS};@MPFR_INCLUDES@")
set(Elemental_INCLUDE_DIRS "${Elemental_INCLUDE_DIRS};@GMP_INCLUDES@")
ENDIF()
set(Elemental_INCLUDE_DIRS
"${Elemental_INCLUDE_DIRS};@Qt5Widgets_INCLUDE_DIRS@")

IF(@EL_HAVE_QT5@)
set(QT_USE_IMPORTED_TARGETS TRUE)
find_package(Qt5Widgets)
if (NOT Qt5Widgets_FOUND)
set(Elemental_NOT_FOUND_MESSAGE "Elemental could not be found because dependency Qt5Widgets could not be found.")
set(Elemental_FOUND False)
return()
endif()

set(Elemental_INCLUDE_DIRS
"${Elemental_INCLUDE_DIRS};@Qt5Widgets_INCLUDE_DIRS@")
ENDIF()

set(Elemental_COMPILE_FLAGS "@CXX_FLAGS@")
set(Elemental_LINK_FLAGS "@EL_LINK_FLAGS@")

set(Elemental_DEFINITIONS "@Qt5Widgets_DEFINITIONS@")
IF(@EL_HAVE_QT5@)
set(Elemental_DEFINITIONS "@Qt5Widgets_DEFINITIONS@")
ENDIF()

# Our library dependencies (contains definitions for IMPORTED targets)
include("${CMAKE_CURRENT_LIST_DIR}/ElementalTargets.cmake")
Expand Down