diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 146f8578d..f9ae8a78d 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -60,6 +60,7 @@ SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) IF(WIN32) FIND_PACKAGE(External REQUIRED) + FIND_PACKAGE(MFC QUIET) IF(NOT DEFINED ENV{QTDIR}) SET(ENV{QTDIR} "c:/qt/4.6.3") diff --git a/code/CMakeModules/FindCustomMFC.cmake b/code/CMakeModules/FindCustomMFC.cmake index b1b43864f..4445c5c1b 100644 --- a/code/CMakeModules/FindCustomMFC.cmake +++ b/code/CMakeModules/FindCustomMFC.cmake @@ -40,7 +40,8 @@ ENDIF(WITH_STLPORT OR NOT MFC_FOUND) # Only if using a custom path IF(CUSTOM_MFC_DIR) IF(NOT CMAKE_SIZEOF_VOID_P) - MESSAGE(FATAL_ERROR "Size of void* is not set, you should call PROJECT(...) before") + INCLUDE (CheckTypeSize) + CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P) ENDIF(NOT CMAKE_SIZEOF_VOID_P) # Using 32 or 64 bits libraries diff --git a/code/CMakeModules/FindDirectXSDK.cmake b/code/CMakeModules/FindDirectXSDK.cmake index 274993d8b..d21261b95 100644 --- a/code/CMakeModules/FindDirectXSDK.cmake +++ b/code/CMakeModules/FindDirectXSDK.cmake @@ -30,6 +30,11 @@ ENDMACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME) IF(DXSDK_DIR) SET(DXSDK_INCLUDE_DIR "${DXSDK_DIR}/Include") + IF(NOT CMAKE_SIZEOF_VOID_P) + INCLUDE (CheckTypeSize) + CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P) + ENDIF(NOT CMAKE_SIZEOF_VOID_P) + IF(CMAKE_SIZEOF_VOID_P EQUAL 8) SET(DXSDK_LIBRARY_DIR "${DXSDK_DIR}/Lib/x64") ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8) diff --git a/code/CMakeModules/FindLibwww.cmake b/code/CMakeModules/FindLibwww.cmake index e130b1062..db4a2f5ad 100644 --- a/code/CMakeModules/FindLibwww.cmake +++ b/code/CMakeModules/FindLibwww.cmake @@ -6,6 +6,8 @@ # LIBWWW_LIBRARY, where to find the LibWWW library. # LIBWWW_FOUND, If false, do not try to use LibWWW. +SET(LIBWWW_FIND_QUIETLY ${Libwww_FIND_QUIETLY}) + # also defined, but not for general use are IF(LIBWWW_LIBRARY AND LIBWWW_INCLUDE_DIR) # in cache already @@ -61,9 +63,12 @@ MACRO(FIND_WWW_LIBRARY MYLIBRARY) IF(${MYLIBRARY}) SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${${MYLIBRARY}}) ELSE(${MYLIBRARY}) - MESSAGE(STATUS "Warning: Libwww: Library not found: ${MYLIBRARY}") + IF(NOT LIBWWW_FIND_QUIETLY) + MESSAGE(STATUS "Warning: Libwww: Library not found: ${MYLIBRARY}") + ENDIF(NOT LIBWWW_FIND_QUIETLY) ENDIF(${MYLIBRARY}) - + + MARK_AS_ADVANCED(${MYLIBRARY}) ENDMACRO(FIND_WWW_LIBRARY MYLIBRARY) # on eg. mac os x and arch linux, libwww sub libraries are not "inter-linked" diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 272aa1455..ddf5c8317 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -173,11 +173,11 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS) OPTION(WITH_GTK "With GTK Support" OFF) OPTION(WITH_QT "With QT Support" OFF) - IF(WIN32) + IF(WIN32 AND MFC_FOUND) OPTION(WITH_MFC "With MFC Support" ON ) - ELSE(WIN32) + ELSE(WIN32 AND MFC_FOUND) OPTION(WITH_MFC "With MFC Support" OFF) - ENDIF(WIN32) + ENDIF(WIN32 AND MFC_FOUND) ### # Optional support