Skip to content

Commit a848e85

Browse files
committed
Use find_package(MFC) in cmake.
1 parent b069be4 commit a848e85

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CMakeLists.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ endif()
9191

9292
find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets)
9393
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets)
94-
if(NOT QT_DIR)
94+
if(NOT QT_FOUND)
9595
message(WARNING "QT not found, so project qt_timer will not be compiled")
9696
else()
9797
if(PROMISE_BUILD_SHARED OR BUILD_SHARED_LIBS)
@@ -104,6 +104,9 @@ else()
104104
add_subdirectory(./example/qt_timer)
105105
endif()
106106

107-
if(MSVC)
107+
find_package(MFC)
108+
if(NOT MFC_FOUND)
109+
message(WARNING "MFC not found, so project mfc_timer will not be compiled")
110+
else()
108111
add_subdirectory(./example/mfc_timer)
109112
endif()

0 commit comments

Comments
 (0)