This commit is contained in:
kaetemi 2011-08-13 23:44:22 +02:00
commit 37b7c76d7b
3 changed files with 30 additions and 5 deletions

View file

@ -6,6 +6,8 @@
# LIBWWW_LIBRARY, where to find the LibWWW library. # LIBWWW_LIBRARY, where to find the LibWWW library.
# LIBWWW_FOUND, If false, do not try to use LibWWW. # LIBWWW_FOUND, If false, do not try to use LibWWW.
OPTION(WITH_LIBWWW_STATIC "Use only static libraries for libwww" OFF)
SET(LIBWWW_FIND_QUIETLY ${Libwww_FIND_QUIETLY}) SET(LIBWWW_FIND_QUIETLY ${Libwww_FIND_QUIETLY})
# also defined, but not for general use are # also defined, but not for general use are
@ -46,6 +48,11 @@ ENDIF(LIBWWW_ADDITIONAL_INCLUDE_DIR)
# helper to find all the libwww sub libraries # helper to find all the libwww sub libraries
MACRO(FIND_WWW_LIBRARY MYLIBRARY OPTION) MACRO(FIND_WWW_LIBRARY MYLIBRARY OPTION)
IF(WITH_LIBWWW_STATIC AND UNIX AND NOT APPLE AND NOT WITH_STATIC_EXTERNAL)
SET(CMAKE_FIND_LIBRARY_SUFFIXES_OLD ${CMAKE_FIND_LIBRARY_SUFFIXES})
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
ENDIF(WITH_LIBWWW_STATIC AND UNIX AND NOT APPLE AND NOT WITH_STATIC_EXTERNAL)
FIND_LIBRARY(${MYLIBRARY} FIND_LIBRARY(${MYLIBRARY}
NAMES ${ARGN} NAMES ${ARGN}
PATHS PATHS
@ -60,21 +67,27 @@ MACRO(FIND_WWW_LIBRARY MYLIBRARY OPTION)
/usr/freeware/lib64 /usr/freeware/lib64
) )
IF(CMAKE_FIND_LIBRARY_SUFFIXES_OLD)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_OLD})
ENDIF(CMAKE_FIND_LIBRARY_SUFFIXES_OLD)
IF(${MYLIBRARY}) IF(${MYLIBRARY})
IF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC) IF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${${MYLIBRARY}}) SET(LIBWWW_LIBRARIES ${LIBWWW_LIBRARIES} ${${MYLIBRARY}})
ENDIF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC) ENDIF(${OPTION} STREQUAL REQUIRED OR WITH_STATIC OR WITH_LIBWWW_STATIC)
ELSE(${MYLIBRARY}) ELSE(${MYLIBRARY})
IF(NOT LIBWWW_FIND_QUIETLY) IF(NOT LIBWWW_FIND_QUIETLY AND NOT WIN32)
MESSAGE(STATUS "Warning: Libwww: Library not found: ${MYLIBRARY}") MESSAGE(STATUS "Warning: Libwww: Library not found: ${MYLIBRARY}")
ENDIF(NOT LIBWWW_FIND_QUIETLY) ENDIF(NOT LIBWWW_FIND_QUIETLY AND NOT WIN32)
ENDIF(${MYLIBRARY}) ENDIF(${MYLIBRARY})
MARK_AS_ADVANCED(${MYLIBRARY}) MARK_AS_ADVANCED(${MYLIBRARY})
ENDMACRO(FIND_WWW_LIBRARY) ENDMACRO(FIND_WWW_LIBRARY)
MACRO(LINK_WWW_LIBRARY MYLIBRARY OTHERLIBRARY SYMBOL) MACRO(LINK_WWW_LIBRARY MYLIBRARY OTHERLIBRARY SYMBOL)
IF(NOT WITH_LIBWWW_STATIC AND NOT WITH_STATIC_EXTERNAL)
LINK_DEPENDS(LIBWWW_LIBRARIES ${MYLIBRARY} ${OTHERLIBRARY} ${SYMBOL}) LINK_DEPENDS(LIBWWW_LIBRARIES ${MYLIBRARY} ${OTHERLIBRARY} ${SYMBOL})
ENDIF(NOT WITH_LIBWWW_STATIC AND NOT WITH_STATIC_EXTERNAL)
ENDMACRO(LINK_WWW_LIBRARY) ENDMACRO(LINK_WWW_LIBRARY)
# Find and link required libs for static or dynamic # Find and link required libs for static or dynamic

View file

@ -36,6 +36,15 @@ LIST(REMOVE_ITEM QT_PROPERTY_EDITOR_MOC_SRC ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbu
${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cxx ${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cxx
${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cxx) ${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cxx)
# We need to add new depencencies on removed files because we need them to be still generated
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtbuttonpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtbuttonpropertybrowser.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qteditorfactory.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qteditorfactory.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtgroupboxpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtgroupboxpropertybrowser.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtpropertymanager.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertymanager.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qttreepropertybrowser.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qttreepropertybrowser.cxx)
SET_PROPERTY(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/qtvariantproperty.cpp APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/moc_qtvariantproperty.cxx)
#set( #set(
# qtpropertyeditor_HEADERS_ONLY_MOC # qtpropertyeditor_HEADERS_ONLY_MOC
# ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cpp # ${CMAKE_CURRENT_BINARY_DIR}/moc_qtpropertybrowser.cpp

View file

@ -107,6 +107,9 @@ void CSoundSystem::init()
std::string mess = std::string("Unable to init sound :") + e.what(); std::string mess = std::string("Unable to init sound :") + e.what();
nlwarning ("Init sound: %s", mess.c_str()); nlwarning ("Init sound: %s", mess.c_str());
_AudioMixer = NULL; _AudioMixer = NULL;
QSettings *settings = Core::ICore::instance()->settings();
if (settings->group() == Constants::OBJECT_VIEWER_SECTION)
settings->endGroup();
return; return;
} }