CMake: Add more option validity checks
This commit is contained in:
parent
5348b4fa3b
commit
c1013d9bfc
@ -134,9 +134,6 @@ if(NOT wxUSE_EXPAT)
|
||||
set(wxUSE_XRC OFF)
|
||||
endif()
|
||||
set(wxUSE_XML ${wxUSE_XRC})
|
||||
if(wxUSE_CONFIG)
|
||||
set(wxUSE_CONFIG_NATIVE ON)
|
||||
endif()
|
||||
|
||||
if(DEFINED wxUSE_OLE AND wxUSE_OLE)
|
||||
set(wxUSE_OLE_AUTOMATION ON)
|
||||
@ -146,6 +143,60 @@ if(wxUSE_OPENGL)
|
||||
set(wxUSE_GLCANVAS ON)
|
||||
endif()
|
||||
|
||||
if(wxUSE_ARCHIVE_STREAMS AND NOT wxUSE_STREAMS)
|
||||
message(WARNING "wxArchive requires wxStreams... disabled")
|
||||
wx_option_force_value(wxUSE_ARCHIVE_STREAMS OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_ZIPSTREAM AND (NOT wxUSE_ARCHIVE_STREAMS OR NOT wxUSE_ZLIB))
|
||||
message(WARNING "wxZip requires wxArchive or wxZlib... disabled")
|
||||
wx_option_force_value(wxUSE_ZIPSTREAM OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_TARSTREAM AND NOT wxUSE_ARCHIVE_STREAMS)
|
||||
message(WARNING "wxTar requires wxArchive... disabled")
|
||||
wx_option_force_value(wxUSE_TARSTREAM OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_FILESYSTEM AND (NOT wxUSE_STREAMS OR (NOT wxUSE_FILE AND NOT wxUSE_FFILE)))
|
||||
message(WARNING "wxFileSystem requires wxStreams and wxFile or wxFFile... disabled")
|
||||
wx_option_force_value(wxUSE_FILESYSTEM OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_FS_ARCHIVE AND (NOT wxUSE_FILESYSTEM OR NOT wxUSE_ARCHIVE_STREAMS))
|
||||
message(WARNING "wxArchiveFSHandler requires wxArchive and wxFileSystem... disabled")
|
||||
wx_option_force_value(wxUSE_FS_ARCHIVE OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_FS_ARCHIVE AND (NOT wxUSE_FILESYSTEM OR NOT wxUSE_ARCHIVE_STREAMS))
|
||||
message(WARNING "wxArchiveFSHandler requires wxArchive and wxFileSystem... disabled")
|
||||
wx_option_force_value(wxUSE_FS_ARCHIVE OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_FS_ZIP AND NOT wxUSE_FS_ARCHIVE)
|
||||
message(WARNING "wxZipFSHandler requires wxArchiveFSHandler... disabled")
|
||||
wx_option_force_value(wxUSE_FS_ZIP OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_TEXTFILE AND (NOT wxUSE_FILE OR NOT wxUSE_TEXTBUFFER))
|
||||
message(WARNING "wxTextFile requires wxFile and wxTextBuffer... disabled")
|
||||
wx_option_force_value(wxUSE_TEXTFILE OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_CONFIG)
|
||||
if(NOT wxUSE_TEXTFILE)
|
||||
message(WARNING "wxConfig requires wxTextFile... disabled")
|
||||
wx_option_force_value(wxUSE_CONFIG OFF)
|
||||
else()
|
||||
set(wxUSE_CONFIG_NATIVE ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(wxUSE_INTL AND NOT wxUSE_FILE)
|
||||
message(WARNING "I18n code requires wxFile... disabled")
|
||||
wx_option_force_value(wxUSE_INTL OFF)
|
||||
endif()
|
||||
|
||||
if(wxUSE_THREADS)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user