@@ -111,15 +111,15 @@ set(Boost_USE_STATIC_RUNTIME OFF)
111
111
if (CUKE_ENABLE_BOOST_TEST)
112
112
# "An external test runner utility is required to link with dynamic library" (Boost User's Guide)
113
113
set (CMAKE_CXX_FLAGS "-DBOOST_TEST_DYN_LINK ${CMAKE_CXX_FLAGS} " )
114
- find_package (Boost 1.70 COMPONENTS unit_test_framework)
114
+ find_package (Boost 1.70 COMPONENTS unit_test_framework REQUIRED )
115
115
endif ()
116
116
117
117
#
118
118
# GTest
119
119
#
120
120
121
121
if (CUKE_ENABLE_GTEST)
122
- find_package (GTest 1.11.0)
122
+ find_package (GTest 1.11.0 REQUIRED )
123
123
endif ()
124
124
125
125
#
@@ -131,6 +131,7 @@ if(CUKE_ENABLE_QT)
131
131
find_package (Qt5Gui)
132
132
find_package (Qt5Widgets)
133
133
find_package (Qt5Test)
134
+ find_package (Qt4 COMPONENTS QtCore QtGui QtTest)
134
135
135
136
if (Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5Widgets_FOUND AND Qt5Test_FOUND)
136
137
message (STATUS "Found Qt version: ${Qt5Core_VERSION_STRING} " )
@@ -144,19 +145,19 @@ if(CUKE_ENABLE_QT)
144
145
set_target_properties (Qt::Widgets PROPERTIES INTERFACE_LINK_LIBRARIES Qt5::Widgets)
145
146
set_target_properties (Qt::Test PROPERTIES INTERFACE_LINK_LIBRARIES Qt5::Test )
146
147
endif ()
148
+ elseif (QT4_FOUND)
149
+ message (STATUS "Found Qt4" )
150
+ add_library (Qt::Core INTERFACE IMPORTED )
151
+ add_library (Qt::Gui INTERFACE IMPORTED )
152
+ add_library (Qt::Widgets INTERFACE IMPORTED )
153
+ add_library (Qt::Test INTERFACE IMPORTED )
154
+ set_target_properties (Qt::Core PROPERTIES INTERFACE_LINK_LIBRARIES Qt4::QtCore)
155
+ set_target_properties (Qt::Gui PROPERTIES INTERFACE_LINK_LIBRARIES Qt4::QtGui )
156
+ set_target_properties (Qt::Widgets PROPERTIES INTERFACE_LINK_LIBRARIES Qt4::QtGui )
157
+ set_target_properties (Qt::Test PROPERTIES INTERFACE_LINK_LIBRARIES Qt4::QtTest)
158
+ include (${QT_USE_FILE} )
147
159
else ()
148
- find_package (Qt4 COMPONENTS QtCore QtGui QtTest)
149
- if (QT4_FOUND)
150
- add_library (Qt::Core INTERFACE IMPORTED )
151
- add_library (Qt::Gui INTERFACE IMPORTED )
152
- add_library (Qt::Widgets INTERFACE IMPORTED )
153
- add_library (Qt::Test INTERFACE IMPORTED )
154
- set_target_properties (Qt::Core PROPERTIES INTERFACE_LINK_LIBRARIES Qt4::QtCore)
155
- set_target_properties (Qt::Gui PROPERTIES INTERFACE_LINK_LIBRARIES Qt4::QtGui )
156
- set_target_properties (Qt::Widgets PROPERTIES INTERFACE_LINK_LIBRARIES Qt4::QtGui )
157
- set_target_properties (Qt::Test PROPERTIES INTERFACE_LINK_LIBRARIES Qt4::QtTest)
158
- include (${QT_USE_FILE} )
159
- endif ()
160
+ message (FATAL_ERROR "Qt not found" )
160
161
endif ()
161
162
endif ()
162
163
0 commit comments