CMake: Enable MFC sample when MFC is available

Closes #23963
This commit is contained in:
Maarten Bent
2025-05-15 00:54:59 +02:00
parent 51037ff728
commit f2ff34b6fb
+8 -2
View File
@@ -276,8 +276,14 @@ if(WIN32)
if(WXMSW)
wx_add_sample(nativdlg nativdlg.cpp nativdlg.h resource.h RES nativdlg.rc)
#TODO: reenable when sample is fixed
#wx_add_sample(mfc mfctest.cpp mfctest.h resource.h stdafx.h RES mfctest.rc)
wx_add_sample(taskbarbutton DEPENDS wxUSE_TASKBARBUTTON)
# only check if MFC is available when the mfc sample is enabled
if(wxBUILD_SAMPLES STREQUAL "ALL")
find_package(MFC QUIET)
if(MFC_FOUND)
wx_add_sample(mfc mfctest.cpp mfctest.h resource.h stdafx.h RES mfctest.rc)
endif()
endif()
endif()
endif()