Commit c9eb3297 authored by David C. Lonie's avatar David C. Lonie

Merge remote-tracking branch 'origin/master' into fix_freetype_on_windows

Change-Id: Ib8c8d862f570e0eacacfb0de60f230e36848a01c
parents 5f0fd5cb 129c6c2d
......@@ -36,6 +36,7 @@ macro(add_external_project _name)
foreach (op_dep ${optional_depends})
if (${op_dep}_ENABLED)
list (APPEND arguments DEPENDS ${op_dep})
#message(STATUS "OPTIONAL DEPENDENCY ${cm-project}->${op_dep}")
endif()
endforeach()
set(${cm-project}_ARGUMENTS "${arguments}")
......@@ -47,6 +48,8 @@ macro(add_external_project _name)
set(${cm-project}_DEPENDS "")
set(${cm-project}_ARGUMENTS "")
set(${cm-project}_NEEDED_BY "")
set(${cm-project}_DEPENDS_ANY "")
set(${cm-project}_DEPENDS_OPTIONAL "")
set(${cm-project}_CAN_USE_SYSTEM 0)
set (doing "")
......@@ -60,8 +63,8 @@ macro(add_external_project _name)
set (doing "")
elseif (doing STREQUAL "DEPENDS")
list(APPEND ${cm-project}_DEPENDS "${arg}")
elseif ((doing STREQUAL "DEPENDS_OPTIONAL") AND ENABLE_${arg})
list(APPEND ${cm-project}_DEPENDS "${arg}")
elseif (doing STREQUAL "DEPENDS_OPTIONAL")
list(APPEND ${cm-project}_DEPENDS_OPTIONAL "${arg}")
endif()
endforeach()
......@@ -72,7 +75,10 @@ macro(add_external_project _name)
if (USE_SYSTEM_${cm-project})
set(${cm-project}_DEPENDS "")
set(${cm-project}_DEPENDS_OPTIONAL "")
endif()
set(${cm-project}_DEPENDS_ANY
${${cm-project}_DEPENDS} ${${cm-project}_DEPENDS_OPTIONAL})
endif()
endmacro()
......@@ -117,11 +123,27 @@ macro(process_dependencies)
endforeach()
list(SORT CM_PROJECTS_ENABLED) # Deterministic order.
# Order list to satisfy dependencies. We don't include the use-system
# libraries in the depedency walk.
# Order list to satisfy dependencies.
# First only use the non-optional dependencies.
include(TopologicalSort)
topological_sort(CM_PROJECTS_ENABLED "" _DEPENDS)
# Now generate a project order using both, optional and non-optional
# dependencies.
set (CM_PROJECTS_ORDER ${CM_PROJECTS_ENABLED})
topological_sort(CM_PROJECTS_ORDER "" _DEPENDS_ANY)
# Update CM_PROJECTS_ENABLED to be in the correct order taking into
# consideration optional dependencies.
set (new_order)
foreach (cm-project IN LISTS CM_PROJECTS_ORDER)
list(FIND CM_PROJECTS_ENABLED "${cm-project}" found)
if (found GREATER -1)
list(APPEND new_order "${cm-project}")
endif()
endforeach()
set (CM_PROJECTS_ENABLED ${new_order})
# build information about what project needs what.
foreach (cm-project IN LISTS CM_PROJECTS_ENABLED)
enable_project(${cm-project} "")
......@@ -184,15 +206,31 @@ macro(project_check_name _name)
endmacro()
#------------------------------------------------------------------------------
# get dependencies for a project, including optional dependencies that are
# currently enabled. Since this macro looks at the ${mod}_ENABLED flag, it
# cannot be used in the 'processing' pass, but the 'build' pass alone.
macro(get_project_depends _name _prefix)
if (NOT build-projects)
message(AUTHOR_WARNING "get_project_depends can only be used in build pass")
endif()
if (NOT ${_prefix}_${_name}_done)
set(${_prefix}_${_name}_done 1)
# process regular dependencies
foreach (dep ${${_name}_DEPENDS})
if (NOT ${_prefix}_${dep}_done)
list(APPEND ${_prefix}_DEPENDS ${dep})
get_project_depends(${dep} ${_prefix})
endif()
endforeach()
# process optional dependencies (only consider those that are enabled).
foreach (dep ${${_name}_DEPENDS_OPTIONAL})
if (${dep}_ENABLED AND NOT ${_prefix}_${dep}_done)
list(APPEND ${_prefix}_DEPENDS ${dep})
get_project_depends(${dep} ${_prefix})
endif()
endforeach()
endif()
endmacro()
......
......@@ -184,8 +184,9 @@ endif()
# REMEMBER to tell VTK/ParaView to use VTK_SYSTEM_* for the
# libraries we've built here.
include(paraview)
include(vistrails)
include(acusolve)
#include(acusolve_plugin)
#include(vistrails_plugin)
#include(nektar_plugin)
#include(mili_plugin)
......
add_external_project(acusolve_plugin
add_external_project(acusolve
DEPENDS paraview
CMAKE_ARGS
......@@ -7,5 +9,5 @@ add_external_project(acusolve_plugin
INSTALL_COMMAND
${CMAKE_COMMAND} -E tar cfz
${CMAKE_CURRENT_BINARY_DIR}/AcuSolveReaderPlugin-${package_suffix}.tgz
<BINARY_DIR>/libAcuSolveReader.so
<BINARY_DIR>/${CMAKE_SHARED_LIBRARY_PREFIX}AcuSolveReader${CMAKE_SHARED_LIBRARY_SUFFIX}
)
......@@ -4,10 +4,19 @@ execute_process(
WORKING_DIRECTORY ${TMP_DIR}
)
execute_process(
if (UNIX AND NOT APPLE)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/libs/libPVCosmologyToolsPlugins.so ${TMP_DIR}/CosmologyToolsPlugin
WORKING_DIRECTORY ${TMP_DIR}
)
)
endif()
if (APPLE)
execute_process(
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/libs/libPVCosmologyToolsPlugins.dylib ${TMP_DIR}/CosmologyToolsPlugin
WORKING_DIRECTORY ${TMP_DIR}
)
endif()
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar cvfz ${bundle_name} ${TMP_DIR}/CosmologyToolsPlugin
......
execute_process(
COMMAND ${CMAKE_COMMAND} -E make_directory ${TMP_DIR}/VisTrailsPlugin
COMMAND ${CMAKE_COMMAND} -E copy ${SOURCE_DIR}/README ${TMP_DIR}/VisTrailsPlugin
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/gui/qt/libVisTrailsGUI.so ${TMP_DIR}/VisTrailsPlugin
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/capi/src/libVisTrails.so ${TMP_DIR}/VisTrailsPlugin
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/paraviewplugin/quazip/libvtquazip.so ${TMP_DIR}/VisTrailsPlugin
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/paraviewplugin/libVisTrailsPlugin.so ${TMP_DIR}/VisTrailsPlugin
COMMAND ${CMAKE_COMMAND} -E tar cvfz ${bundle_name} ${TMP_DIR}/VisTrailsPlugin
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/gui/qt/${CMAKE_SHARED_LIBRARY_PREFIX}VisTrailsGUI${CMAKE_SHARED_LIBRARY_SUFFIX} ${TMP_DIR}/VisTrailsPlugin
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/capi/src/${CMAKE_SHARED_LIBRARY_PREFIX}VisTrails${CMAKE_SHARED_LIBRARY_SUFFIX} ${TMP_DIR}/VisTrailsPlugin
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/paraviewplugin/quazip/${CMAKE_SHARED_LIBRARY_PREFIX}vtquazip${CMAKE_SHARED_LIBRARY_SUFFIX} ${TMP_DIR}/VisTrailsPlugin
COMMAND ${CMAKE_COMMAND} -E copy ${BINARY_DIR}/paraviewplugin/${CMAKE_SHARED_LIBRARY_PREFIX}VisTrailsPlugin${CMAKE_SHARED_LIBRARY_SUFFIX} ${TMP_DIR}/VisTrailsPlugin
WORKING_DIRECTORY ${TMP_DIR})
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar cvfz ${bundle_name} ${TMP_DIR}/VisTrailsPlugin
WORKING_DIRECTORY ${TMP_DIR})
......@@ -6,7 +6,7 @@ endif()
add_external_project(paraview
DEPENDS_OPTIONAL
ffmpeg hdf5 libxml3 manta matplotlib mpi numpy png python qt visitbridge zlib silo cgns
boost ffmpeg hdf5 libxml3 manta matplotlib mpi numpy png python qt visitbridge zlib silo cgns
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=ON
......
# Include file to make it easy to include WebKit into Qt projects
contains(QT_CONFIG, qpa)|contains(QT_CONFIG, embedded): CONFIG += embedded
# Detect that we are building as a standalone package by the presence of
# either the generated files directory or as part of the Qt package through
# QTDIR_build
CONFIG(QTDIR_build) {
CONFIG += standalone_package
# Make sure we compile both debug and release on mac when inside Qt.
# This line was extracted from qbase.pri instead of including the whole file
win32|mac:!macx-xcode:CONFIG += debug_and_release
# In case we are building a universal binary for Qt, building debug is not
# possible because we would exceed the maximum library size for 32bit.
mac:contains(QT_CONFIG, x86):contains(QT_CONFIG, x86_64) {
CONFIG(debug_and_release)|CONFIG(debug, debug|release) {
message(Building a universal binary with debug symbols is not possible. Building release!)
CONFIG -= debug_and_release debug
CONFIG += release
}
}
} else {
!CONFIG(release, debug|release) {
OBJECTS_DIR = obj/debug
} else { # Release
OBJECTS_DIR = obj/release
DEFINES *= NDEBUG
}
exists($$PWD/WebCore/generated):CONFIG += standalone_package
# Make sure that build_all follows the build_all config in WebCore
mac:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework):!build_pass:CONFIG += build_all
}
CONFIG(standalone_package): DEFINES *= NDEBUG
CONFIG += depend_includepath
DEPENDPATH += $$OUT_PWD
DEFINES += BUILDING_QT__=1
building-libs {
win32-msvc*|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
} else {
CONFIG(QTDIR_build) {
QT += webkit
} else {
QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
QTWEBKITLIBNAME = QtWebKit
mac:!static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
LIBS += -framework $$QTWEBKITLIBNAME
QMAKE_FRAMEWORKPATH = $$OUTPUT_DIR/lib $$QMAKE_FRAMEWORKPATH
} else {
build_pass: win32-*|wince* {
!CONFIG(release, debug|release): QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d
QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}$${QT_MAJOR_VERSION}
win32-g++*: LIBS += -l$$QTWEBKITLIBNAME
else: LIBS += $${QTWEBKITLIBNAME}.lib
} else {
LIBS += -lQtWebKit
symbian {
TARGET.EPOCSTACKSIZE = 0x14000 // 80 kB
# For EXEs only: set heap to usable value
TARGET.EPOCHEAPSIZE =
heapSizeRule = \
"$${LITERAL_HASH}ifdef WINSCW" \
"EPOCHEAPSIZE 0x40000 0x2000000 // Min 256kB, Max 32MB" \
"$${LITERAL_HASH}else" \
"EPOCHEAPSIZE 0x40000 0x10000000 // Min 256kB, Max 256MB" \
"$${LITERAL_HASH}endif"
MMP_RULES += heapSizeRule
}
}
}
}
DEPENDPATH += $$PWD/WebKit/qt/Api
}
CONFIG(release, debug|release) {
DEFINES += NDEBUG
}
INCLUDEPATH += \
$$PWD \
$$PWD/../include \
$$OUTPUT_DIR/include/QtWebKit \
$$OUTPUT_DIR/include \
$$QT.script.includes
DEFINES += QT_ASCII_CAST_WARNINGS
webkit2:INCLUDEPATH *= $$OUTPUT_DIR/include/WebKit2
# Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC
win32-g++* {
TMPPATH = $$quote($$(INCLUDE))
QMAKE_INCDIR_POST += $$split(TMPPATH,";")
TMPPATH = $$quote($$(LIB))
QMAKE_LIBDIR_POST += $$split(TMPPATH,";")
}
CONFIG -= warn_on
*-g++*:QMAKE_CXXFLAGS += -Wall -Wextra -Wreturn-type -fno-strict-aliasing -Wcast-align -Wchar-subscripts -Wformat-security -Wreturn-type -Wno-unused-parameter -Wno-sign-compare -Wno-switch -Wno-switch-enum -Wundef -Wmissing-noreturn -Winit-self
# Treat warnings as errors on x86/Linux/GCC
linux-g++* {
# Overcome error on i386 with older GCC (4.1 or so).
#!CONFIG(standalone_package):isEqual(QT_ARCH,x86_64)|isEqual(QT_ARCH,i386): QMAKE_CXXFLAGS += -Werror
greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) {
if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) {
# We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr).
QMAKE_CFLAGS_WARN_ON += -Wno-c++0x-compat
QMAKE_CXXFLAGS_WARN_ON += -Wno-c++0x-compat
QMAKE_CFLAGS += -Wno-c++0x-compat
QMAKE_CXXFLAGS += -Wno-c++0x-compat
}
}
}
symbian|*-armcc {
# Enable GNU compiler extensions to the ARM compiler for all Qt ports using RVCT
RVCT_COMMON_CFLAGS = --gnu --diag_suppress 68,111,177,368,830,1293
RVCT_COMMON_CXXFLAGS = $$RVCT_COMMON_CFLAGS --no_parse_templates
# Make debug symbols leaner in RVCT4.x. Ignored by compiler for release builds
QMAKE_CXXFLAGS.ARMCC_4_0 += --remove_unneeded_entities
# Match other compilers' (GCC, MSVC, WINSCW...) behavior regarding bitfield signedness.
# This flag is not needed for RVCT 2.x.
QMAKE_CXXFLAGS.ARMCC_4_0 += --signed_bitfields
}
*-armcc {
QMAKE_CFLAGS += $$RVCT_COMMON_CFLAGS
QMAKE_CXXFLAGS += $$RVCT_COMMON_CXXFLAGS
}
symbian {
QMAKE_CXXFLAGS.ARMCC += $$RVCT_COMMON_CXXFLAGS
}
valgrind {
contains(JAVASCRIPTCORE_JIT,yes): error("'JAVASCRIPTCORE_JIT=yes' not supported with valgrind")
QMAKE_CXXFLAGS += -g
QMAKE_LFLAGS += -g
DEFINES += USE_SYSTEM_MALLOC=1
DEFINES += ENABLE_JIT=0
JAVASCRIPTCORE_JIT = no
}
# Disable dependency to a specific version of a Qt package for non-production builds
symbian:!CONFIG(production):default_deployment.pkg_prerules -= pkg_depends_qt
##### Defaults for some mobile platforms
symbian|maemo5|maemo6 {
CONFIG += disable_uitools
CONFIG += enable_fast_mobile_scrolling
CONFIG += use_qt_mobile_theme
maemo6: CONFIG += include_webinspector
} else {
CONFIG += include_webinspector
}
*sh4* {
CONFIG += disable_uitools
}
####
disable_uitools: DEFINES *= QT_NO_UITOOLS
# Disable a few warnings on Windows. The warnings are also
# disabled in WebKitLibraries/win/tools/vsprops/common.vsprops
win32-msvc*|wince*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996
win32-icc: QMAKE_CXXFLAGS += -wd873
CONFIG(qt_minimal) {
DEFINES *= QT_NO_ANIMATION
DEFINES *= QT_NO_BEARERMANAGEMENT
DEFINES *= QT_NO_CLIPBOARD
DEFINES *= QT_NO_COMBOBOX
DEFINES *= QT_NO_CONCURRENT
DEFINES *= QT_NO_CRASHHANDLER
DEFINES *= QT_NO_CURSOR
DEFINES *= QT_NO_DESKTOPSERVICES
DEFINES *= QT_NO_FILEDIALOG
DEFINES *= QT_NO_GRAPHICSEFFECT
DEFINES *= QT_NO_IM
DEFINES *= QT_NO_INPUTDIALOG
DEFINES *= QT_NO_LINEEDIT
DEFINES *= QT_NO_MESSAGEBOX
DEFINES *= QT_NO_OPENSSL
DEFINES *= QT_NO_PRINTER
DEFINES *= QT_NO_QUUID_STRING
DEFINES *= QT_NO_SHORTCUT
DEFINES *= QT_NO_STYLE_STYLESHEET
DEFINES *= QT_NO_SYSTEMTRAYICON
DEFINES *= QT_NO_TEMPORARYFILE
DEFINES *= QT_NO_TOOLTIP
DEFINES *= QT_NO_UITOOLS
DEFINES *= QT_NO_UNDOCOMMAND
DEFINES *= QT_NO_UNDOSTACK
DEFINES *= QT_NO_XRENDER
}
contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
......@@ -7,6 +7,10 @@ if (NOT APPLE AND UNIX)
-system-libpng
-I <INSTALL_DIR>/include/freetype2
-I <INSTALL_DIR>/include/fontconfig)
# Fix Qt build failure with GCC 4.1.
set (patch_command ${CMAKE_COMMAND} -E copy_if_different
${SuperBuild_PROJECTS_DIR}/patches/qt.src.3rdparty.webkit.Source.WebKit.pri
<SOURCE_DIR>/src/3rdparty/webkit/Source/WebKit.pri)
elseif (APPLE)
list (APPEND qt_options
-sdk ${CMAKE_OSX_SYSROOT}
......@@ -35,7 +39,6 @@ add_external_project_or_use_system(
-no-openssl
-no-phonon
-no-xinerama
-no-script
-no-scripttools
-no-svg
-no-declarative-debug
......
add_external_project(vistrails_plugin
DEPENDS paraview boost
add_external_project(vistrails
DEPENDS paraview
CMAKE_ARGS
-DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
......
......@@ -120,11 +120,11 @@ add_revision(cosmologytools
GIT_REPOSITORY git://public.kitware.com/cosmologytools.git
GIT_TAG master)
add_revision(acusolve_plugin
add_revision(acusolve
GIT_REPOSITORY git://kwsource.kitwarein.com/paraview/acusolvereaderplugin.git
GIT_TAG master)
add_revision(vistrails_plugin
add_revision(vistrails
GIT_REPOSITORY git://kwsource.kitwarein.com/paraview/vistrails.git
GIT_TAG master)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment