summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-01-31 14:58:50 (GMT)
committerBrad King <brad.king@kitware.com>2013-01-31 14:58:50 (GMT)
commit118c32f8f211b0bb9a096fbb0711cacf2b68f057 (patch)
treed72f1f0bc3aeea7ab9c95f130f7de435fc2cf262 /Modules
parentcf8645e82dbb7dff434b14bd127c5457745e4db8 (diff)
parentf447db7f102519e09258f0bd06668a9ae572ec68 (diff)
downloadCMake-118c32f8f211b0bb9a096fbb0711cacf2b68f057.zip
CMake-118c32f8f211b0bb9a096fbb0711cacf2b68f057.tar.gz
CMake-118c32f8f211b0bb9a096fbb0711cacf2b68f057.tar.bz2
Merge branch 'xcode-duplicate-flags-13354' into generator-toolset
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCCompiler.cmake.in1
-rw-r--r--Modules/CMakeCXXCompiler.cmake.in1
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake25
-rw-r--r--Modules/CMakeFortranCompiler.cmake.in1
-rw-r--r--Modules/CMakeFortranCompilerId.F.in6
-rw-r--r--Modules/CMakePackageConfigHelpers.cmake5
-rw-r--r--Modules/CMakeParseImplicitLinkInfo.cmake51
-rw-r--r--Modules/CMakePlatformId.h.in5
-rw-r--r--Modules/CPackWIX.cmake26
-rw-r--r--Modules/CheckForPthreads.c2
-rw-r--r--Modules/FindGLUT.cmake28
-rw-r--r--Modules/FindLua51.cmake2
-rw-r--r--Modules/FindOpenGL.cmake30
-rw-r--r--Modules/FindQt.cmake14
-rw-r--r--Modules/FindQt3.cmake6
-rw-r--r--Modules/FindQt4.cmake103
-rw-r--r--Modules/FindSDL_image.cmake3
-rw-r--r--Modules/FindSDL_mixer.cmake3
-rw-r--r--Modules/FindSDL_net.cmake3
-rw-r--r--Modules/FindSDL_sound.cmake3
-rw-r--r--Modules/FindSDL_ttf.cmake3
-rw-r--r--Modules/Platform/Darwin-Clang.cmake1
-rw-r--r--Modules/Platform/Darwin-GNU.cmake1
-rw-r--r--Modules/Platform/Darwin.cmake18
-rw-r--r--Modules/WIX.template.in13
25 files changed, 288 insertions, 66 deletions
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index d74dcdc..c41adc9 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -50,6 +50,7 @@ endif()
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "@CMAKE_C_IMPLICIT_LINK_LIBRARIES@")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index 8c5d84e..9287b81 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -51,6 +51,7 @@ endif()
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@")
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
@SET_CMAKE_CMCLDEPS_EXECUTABLE@
@SET_CMAKE_CL_SHOWINCLUDE_PREFIX@
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index 75247d9..25d6bbe 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -72,19 +72,9 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Parse implicit linker information for this language, if available.
set(implicit_dirs "")
set(implicit_libs "")
- set(MULTI_ARCH FALSE)
- if(DEFINED CMAKE_OSX_ARCHITECTURES)
- if( "${CMAKE_OSX_ARCHITECTURES}" MATCHES ";" )
- set(MULTI_ARCH TRUE)
- endif()
- endif()
- if(CMAKE_${lang}_VERBOSE_FLAG
- # Implicit link information cannot be used explicitly for
- # multiple OS X architectures, so we skip it.
- AND NOT MULTI_ARCH
- # Skip this with Xcode for now.
- AND NOT "${CMAKE_GENERATOR}" MATCHES Xcode)
- CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs log
+ set(implicit_fwks "")
+ if(CMAKE_${lang}_VERBOSE_FLAG)
+ CMAKE_PARSE_IMPLICIT_LINK_INFO("${OUTPUT}" implicit_libs implicit_dirs implicit_fwks log
"${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Parsed ${lang} implicit link information from above output:\n${log}\n\n")
@@ -112,8 +102,17 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
message(STATUS "${_desc}")
endif()
+ # Implicit link libraries cannot be used explicitly for multiple
+ # OS X architectures, so we skip it.
+ if(DEFINED CMAKE_OSX_ARCHITECTURES)
+ if("${CMAKE_OSX_ARCHITECTURES}" MATCHES ";")
+ set(implicit_libs "")
+ endif()
+ endif()
+
set(CMAKE_${lang}_IMPLICIT_LINK_LIBRARIES "${implicit_libs}" PARENT_SCOPE)
set(CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES "${implicit_dirs}" PARENT_SCOPE)
+ set(CMAKE_${lang}_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "${implicit_fwks}" PARENT_SCOPE)
# Detect library architecture directory name.
if(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in
index 55f8277..d193881 100644
--- a/Modules/CMakeFortranCompiler.cmake.in
+++ b/Modules/CMakeFortranCompiler.cmake.in
@@ -52,3 +52,4 @@ endif()
set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "@CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES@")
set(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES@")
+set(CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_Fortran_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 4d25de0..f84852a 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -74,12 +74,8 @@
PRINT *, 'INFO:platform[IRIX]'
#elif defined(__hpux) || defined(__hpux__)
PRINT *, 'INFO:platform[HP-UX]'
-#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
+#elif defined(__HAIKU__)
PRINT *, 'INFO:platform[Haiku]'
-# if 0
-! Haiku also defines __BEOS__ so we must
-! put it prior to the check for __BEOS__
-# endif
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
PRINT *, 'INFO:platform[BeOS]'
#elif defined(__QNX__) || defined(__QNXNTO__)
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index 96ecb42..a92ce7c 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -188,8 +188,13 @@ function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
endif()
endforeach()
+ get_filename_component(inputFileName "${_inputFile}" NAME)
+
set(PACKAGE_INIT "
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
+####### Any changes to this file will be overwritten by the next CMake run ####
+####### The input file was ${inputFileName} ########
+
get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE_RELATIVE_PATH}\" ABSOLUTE)
")
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index ecb20dc..234fb7f 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -16,9 +16,10 @@
# This is used internally by CMake and should not be included by user
# code.
-function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
+function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj_regex)
set(implicit_libs_tmp "")
set(implicit_dirs_tmp)
+ set(implicit_fwks_tmp)
set(log "")
# Parse implicit linker arguments.
@@ -36,6 +37,16 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
set(cmd)
if("${line}" MATCHES "${linker_regex}" AND
NOT "${line}" MATCHES "${linker_exclude_regex}")
+ if(XCODE)
+ # Xcode unconditionally adds a path under the project build tree and
+ # on older versions it is not reported with proper quotes. Remove it.
+ string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" _dir_regex "${CMAKE_BINARY_DIR}")
+ string(REGEX REPLACE " -[FL]${_dir_regex}/([^ ]| [^-])+( |$)" " " xline "${line}")
+ if(NOT "x${xline}" STREQUAL "x${line}")
+ set(log "${log} reduced line: [${line}]\n to: [${xline}]\n")
+ set(line "${xline}")
+ endif()
+ endif()
if(UNIX)
separate_arguments(args UNIX_COMMAND "${line}")
else()
@@ -97,6 +108,18 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
endif()
endforeach()
+ # Look for library search paths reported by linker.
+ if("${output_lines}" MATCHES ";Library search paths:((;\t[^;]+)+)")
+ string(REPLACE ";\t" ";" implicit_dirs_match "${CMAKE_MATCH_1}")
+ set(log "${log} Library search paths: [${implicit_dirs_match}]\n")
+ list(APPEND implicit_dirs_tmp ${implicit_dirs_match})
+ endif()
+ if("${output_lines}" MATCHES ";Framework search paths:((;\t[^;]+)+)")
+ string(REPLACE ";\t" ";" implicit_fwks_match "${CMAKE_MATCH_1}")
+ set(log "${log} Framework search paths: [${implicit_fwks_match}]\n")
+ list(APPEND implicit_fwks_tmp ${implicit_fwks_match})
+ endif()
+
# Cleanup list of libraries and flags.
# We remove items that are not language-specific.
set(implicit_libs "")
@@ -108,21 +131,33 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var log_var obj_regex)
endif()
endforeach()
- # Cleanup list of directories.
- set(implicit_dirs "")
- foreach(d IN LISTS implicit_dirs_tmp)
- get_filename_component(dir "${d}" ABSOLUTE)
- list(APPEND implicit_dirs "${dir}")
- set(log "${log} collapse dir [${d}] ==> [${dir}]\n")
+ # Cleanup list of library and framework directories.
+ set(desc_dirs "library")
+ set(desc_fwks "framework")
+ foreach(t dirs fwks)
+ set(implicit_${t} "")
+ foreach(d IN LISTS implicit_${t}_tmp)
+ get_filename_component(dir "${d}" ABSOLUTE)
+ string(FIND "${dir}" "${CMAKE_FILES_DIRECTORY}/" pos)
+ if(NOT pos LESS 0)
+ set(msg ", skipping non-system directory")
+ else()
+ set(msg "")
+ list(APPEND implicit_${t} "${dir}")
+ endif()
+ set(log "${log} collapse ${desc_${t}} dir [${d}] ==> [${dir}]${msg}\n")
+ endforeach()
+ list(REMOVE_DUPLICATES implicit_${t})
endforeach()
- list(REMOVE_DUPLICATES implicit_dirs)
# Log results.
set(log "${log} implicit libs: [${implicit_libs}]\n")
set(log "${log} implicit dirs: [${implicit_dirs}]\n")
+ set(log "${log} implicit fwks: [${implicit_fwks}]\n")
# Return results.
set(${lib_var} "${implicit_libs}" PARENT_SCOPE)
set(${dir_var} "${implicit_dirs}" PARENT_SCOPE)
+ set(${fwk_var} "${implicit_fwks}" PARENT_SCOPE)
set(${log_var} "${log}" PARENT_SCOPE)
endfunction()
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in
index c373414..69171c2 100644
--- a/Modules/CMakePlatformId.h.in
+++ b/Modules/CMakePlatformId.h.in
@@ -35,11 +35,8 @@
#elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX"
-#elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
+#elif defined(__HAIKU__)
# define PLATFORM_ID "Haiku"
-/* Haiku also defines __BEOS__ so we must
- put it prior to the check for __BEOS__
-*/
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS"
diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake
index f278953..0c0a8f1 100644
--- a/Modules/CPackWIX.cmake
+++ b/Modules/CPackWIX.cmake
@@ -49,6 +49,32 @@
# by the WiX Generator in case CPACK_RESOURCE_FILE_LICENSE
# is in an unsupported format or the .txt -> .rtf
# conversion does not work as expected.
+#
+##end
+#
+##variable
+# CPACK_WIX_PRODUCT_ICON - The Icon shown next to the program name in Add/Remove programs.
+#
+# If set, this icon is used in place of the default icon.
+#
+##end
+#
+##variable
+# CPACK_WIX_UI_BANNER - The bitmap will appear at the top of all installer pages other than the welcome and completion dialogs.
+#
+# If set, this image will replace the default banner image.
+#
+# This image must be 493 by 58 pixels.
+#
+##end
+#
+##variable
+# CPACK_WIX_UI_DIALOG - Background bitmap used on the welcome and completion dialogs.
+#
+# If this variable is set, the installer will replace the default dialog image.
+#
+# This image must be 493 by 312 pixels.
+#
##end
#=============================================================================
diff --git a/Modules/CheckForPthreads.c b/Modules/CheckForPthreads.c
index 882dc21..7250fbf 100644
--- a/Modules/CheckForPthreads.c
+++ b/Modules/CheckForPthreads.c
@@ -16,7 +16,7 @@ int main(int ac, char*av[]){
pthread_create(&tid[0], 0, runner, (void*)1);
pthread_create(&tid[1], 0, runner, (void*)2);
-#if defined(__BEOS__) && !defined(__ZETA__) && !defined(__HAIKU__) // (no usleep on BeOS 5.)
+#if defined(__BEOS__) && !defined(__ZETA__) // (no usleep on BeOS 5.)
usleep(1); // for strange behavior on single-processor sun
#endif
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 55790ae..843d138 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -40,25 +40,39 @@ else ()
set(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
else ()
+ if (BEOS)
+
+ set(_GLUT_INC_DIR /boot/develop/headers/os/opengl)
+ set(_GLUT_glut_LIB_DIR /boot/develop/lib/x86)
+
+ else()
+
+ find_library( GLUT_Xi_LIBRARY Xi
+ /usr/openwin/lib
+ )
+
+ find_library( GLUT_Xmu_LIBRARY Xmu
+ /usr/openwin/lib
+ )
+
+ endif ()
+
find_path( GLUT_INCLUDE_DIR GL/glut.h
/usr/include/GL
/usr/openwin/share/include
/usr/openwin/include
/opt/graphics/OpenGL/include
/opt/graphics/OpenGL/contrib/libglut
+ ${_GLUT_INC_DIR}
)
find_library( GLUT_glut_LIBRARY glut
/usr/openwin/lib
+ ${_GLUT_glut_LIB_DIR}
)
- find_library( GLUT_Xi_LIBRARY Xi
- /usr/openwin/lib
- )
-
- find_library( GLUT_Xmu_LIBRARY Xmu
- /usr/openwin/lib
- )
+ unset(_GLUT_INC_DIR)
+ unset(_GLUT_glut_LIB_DIR)
endif ()
diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake
index 2d7ed3d..a2bf0c0 100644
--- a/Modules/FindLua51.cmake
+++ b/Modules/FindLua51.cmake
@@ -54,7 +54,7 @@ find_library(LUA_LIBRARY
if(LUA_LIBRARY)
# include the math library for Unix
- if(UNIX AND NOT APPLE)
+ if(UNIX AND NOT APPLE AND NOT BEOS)
find_library(LUA_MATH_LIBRARY m)
set( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
# For Windows and Mac, don't need to explicitly include the math library
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 4a393f2..96c4d8d 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -58,14 +58,22 @@ else ()
find_path(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX")
else()
- # Handle HP-UX cases where we only want to find OpenGL in either hpux64
- # or hpux32 depending on if we're doing a 64 bit build.
- if(CMAKE_SIZEOF_VOID_P EQUAL 4)
- set(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/)
- else()
- set(HPUX_IA_OPENGL_LIB_PATH
- /opt/graphics/OpenGL/lib/hpux64/
- /opt/graphics/OpenGL/lib/pa20_64)
+ if (CMAKE_SYSTEM_NAME MATCHES "HP-UX")
+ # Handle HP-UX cases where we only want to find OpenGL in either hpux64
+ # or hpux32 depending on if we're doing a 64 bit build.
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(_OPENGL_LIB_PATH
+ /opt/graphics/OpenGL/lib/hpux32/)
+ else()
+ set(_OPENGL_LIB_PATH
+ /opt/graphics/OpenGL/lib/hpux64/
+ /opt/graphics/OpenGL/lib/pa20_64)
+ endif()
+ elseif(CMAKE_SYSTEM_NAME STREQUAL Haiku)
+ set(_OPENGL_LIB_PATH
+ /boot/develop/lib/x86)
+ set(_OPENGL_INCLUDE_PATH
+ /boot/develop/headers/os/opengl)
endif()
# The first line below is to make sure that the proper headers
@@ -80,6 +88,7 @@ else ()
/usr/share/doc/NVIDIA_GLX-1.0/include
/usr/openwin/share/include
/opt/graphics/OpenGL/include /usr/X11R6/include
+ ${_OPENGL_INCLUDE_PATH}
)
find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
@@ -93,9 +102,12 @@ else ()
PATHS /opt/graphics/OpenGL/lib
/usr/openwin/lib
/usr/shlib /usr/X11R6/lib
- ${HPUX_IA_OPENGL_LIB_PATH}
+ ${_OPENGL_LIB_PATH}
)
+ unset(_OPENGL_INCLUDE_PATH)
+ unset(_OPENGL_LIB_PATH)
+
# On Unix OpenGL most certainly always requires X11.
# Feel free to tighten up these conditions if you don't
# think this is always true.
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake
index 541cc05..54b7c6f 100644
--- a/Modules/FindQt.cmake
+++ b/Modules/FindQt.cmake
@@ -43,6 +43,12 @@ if(GLOB_TEMP_VAR)
endif()
set(GLOB_TEMP_VAR)
+file(GLOB GLOB_TEMP_VAR /usr/local/lib/qt3/bin/qmake)
+if(GLOB_TEMP_VAR)
+ set(QT3_INSTALLED TRUE)
+endif()
+set(GLOB_TEMP_VAR)
+
# look for qt4 installations
file(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-4*/bin/qmake)
if(GLOB_TEMP_VAR)
@@ -56,6 +62,12 @@ if(GLOB_TEMP_VAR)
endif()
set(GLOB_TEMP_VAR)
+file(GLOB GLOB_TEMP_VAR /usr/local/lib/qt4/bin/qmake)
+if(GLOB_TEMP_VAR)
+ set(QT4_INSTALLED TRUE)
+endif()
+set(GLOB_TEMP_VAR)
+
if (Qt_FIND_VERSION)
set(DESIRED_QT_VERSION "${Qt_FIND_VERSION}")
endif ()
@@ -91,6 +103,7 @@ find_file( QT4_QGLOBAL_H_FILE qglobal.h
/usr/lib/qt/include/Qt
/usr/include/Qt
/usr/share/qt4/include/Qt
+ /usr/local/include/X11/qt4/Qt
C:/Progra~1/qt/include/Qt )
if(QT4_QGLOBAL_H_FILE)
@@ -110,6 +123,7 @@ find_file( QT3_QGLOBAL_H_FILE qglobal.h
/usr/lib/qt/include
/usr/include
/usr/share/qt3/include
+ /usr/local/include/X11/qt3
C:/Progra~1/qt/include
/usr/include/qt3 )
diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index 07b6fef..4fc8e40 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -64,6 +64,7 @@ find_path(QT_INCLUDE_DIR qt.h
/usr/share/qt3/include
C:/Progra~1/qt/include
/usr/include/qt3
+ /usr/local/include/X11/qt3
)
# if qglobal.h is not in the qt_include_dir then set
@@ -146,7 +147,7 @@ find_library(QT_QASSISTANTCLIENT_LIBRARY
# Qt 3 should prefer QTDIR over the PATH
find_program(QT_MOC_EXECUTABLE
- NAMES moc-qt3 moc
+ NAMES moc-qt3 moc moc3 moc3-mt
HINTS
ENV QTDIR
PATHS
@@ -154,6 +155,7 @@ find_program(QT_MOC_EXECUTABLE
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
${GLOB_PATHS_BIN}
+ /usr/local/lib/qt3
/usr/local/qt
/usr/lib/qt
/usr/lib/qt3
@@ -170,7 +172,7 @@ endif()
# Qt 3 should prefer QTDIR over the PATH
find_program(QT_UIC_EXECUTABLE
- NAMES uic-qt3 uic
+ NAMES uic-qt3 uic uic3 uic3-mt
HINTS
ENV QTDIR
PATHS
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 00e86e8..7baa11b 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -418,6 +418,15 @@ macro (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" )
endif()
endif ()
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ "${QT_${basename}_INCLUDE_DIR}"
+ )
+ string(REGEX REPLACE "^QT" "" _stemname ${basename})
+ set_property(TARGET Qt4::${_camelCaseBasename} PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS
+ "QT_${_stemname}_LIB"
+ )
endif()
# If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are set to point at these
@@ -538,6 +547,11 @@ endif ()
if (QT_QMAKE_EXECUTABLE AND QTVERSION)
+ # set version variables
+ string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
+ string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
+
# ask qmake for the mkspecs directory
# we do this first because QT_LIBINFIX might be set
if (NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
@@ -942,12 +956,49 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
############################################
+ macro(_qt4_add_target_depends_internal _QT_MODULE _PROPERTY)
+ if (TARGET Qt4::${_QT_MODULE})
+ foreach(_DEPEND ${ARGN})
+ if (NOT TARGET Qt4::Qt${_DEPEND})
+ message(FATAL_ERROR "_qt4_add_target_depends invoked with invalid arguments")
+ endif()
+ set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
+ ${_PROPERTY}
+ "Qt4::Qt${_DEPEND}"
+ )
+ set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ "$<TARGET_PROPERTY:Qt4::Qt${_DEPEND},INTERFACE_INCLUDE_DIRECTORIES>"
+ )
+ set_property(TARGET Qt4::${_QT_MODULE} APPEND PROPERTY
+ INTERFACE_COMPILE_DEFINITIONS
+ "$<TARGET_PROPERTY:Qt4::Qt${_DEPEND},INTERFACE_COMPILE_DEFINITIONS>"
+ )
+ endforeach()
+ endif()
+ endmacro()
+
+ macro(_qt4_add_target_depends _QT_MODULE)
+ _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_INTERFACE_LIBRARIES ${ARGN})
+ endmacro()
+
+ macro(_qt4_add_target_private_depends _QT_MODULE)
+ _qt4_add_target_depends_internal(${_QT_MODULE} IMPORTED_LINK_DEPENDENT_LIBRARIES ${ARGN})
+ endmacro()
+
+
# Set QT_xyz_LIBRARY variable and add
# library include path to QT_INCLUDES
_QT4_ADJUST_LIB_VARS(QtCore)
+ set_property(TARGET Qt4::QtCore APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES
+ "${QT_MKSPECS_DIR}/default"
+ ${QT_INCLUDE_DIR}
+ )
foreach(QT_MODULE ${QT_MODULES})
_QT4_ADJUST_LIB_VARS(${QT_MODULE})
+ _qt4_add_target_depends(${QT_MODULE} Core)
endforeach()
_QT4_ADJUST_LIB_VARS(QtAssistant)
@@ -962,6 +1013,41 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
_QT4_ADJUST_LIB_VARS(QAxContainer)
endif()
+ # Only public dependencies are listed here.
+ # Eg, QtDBus links to QtXml, but users of QtDBus do not need to
+ # link to QtXml because QtDBus only uses it internally, not in public
+ # headers.
+ # Everything depends on QtCore, but that is covered above already
+ _qt4_add_target_depends(Qt3Support Sql Gui Network)
+ if (TARGET Qt4::Qt3Support)
+ # An additional define is required for QT3_SUPPORT
+ set_property(TARGET Qt4::Qt3Support APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT3_SUPPORT)
+ endif()
+ _qt4_add_target_depends(QtDeclarative Script Gui)
+ _qt4_add_target_depends(QtDesigner Gui)
+ _qt4_add_target_depends(QtHelp Gui)
+ _qt4_add_target_depends(QtMultimedia Gui)
+ _qt4_add_target_depends(QtOpenGL Gui)
+ _qt4_add_target_depends(QtSvg Gui)
+ _qt4_add_target_depends(QtWebKit Gui Network)
+
+ _qt4_add_target_private_depends(Qt3Support Xml)
+ _qt4_add_target_private_depends(QtSvg Xml)
+ _qt4_add_target_private_depends(QtDBus Xml)
+ _qt4_add_target_private_depends(QtUiTools Xml Gui)
+ _qt4_add_target_private_depends(QtHelp Sql Xml Network)
+ _qt4_add_target_private_depends(QtXmlPatterns Network)
+ _qt4_add_target_private_depends(QtScriptTools Gui)
+ _qt4_add_target_private_depends(QtWebKit XmlPatterns)
+ _qt4_add_target_private_depends(QtDeclarative XmlPatterns Svg Sql Gui)
+ _qt4_add_target_private_depends(QtMultimedia Gui)
+ _qt4_add_target_private_depends(QtOpenGL Gui)
+ _qt4_add_target_private_depends(QAxServer Gui)
+ _qt4_add_target_private_depends(QAxContainer Gui)
+ _qt4_add_target_private_depends(phonon Gui)
+ if(QT_QTDBUS_FOUND)
+ _qt4_add_target_private_depends(phonon DBus)
+ endif()
#######################################
#
@@ -986,13 +1072,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
endif()
find_program(QT_MOC_EXECUTABLE
- NAMES moc-qt4 moc
+ NAMES moc-qt4 moc moc4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_UIC_EXECUTABLE
- NAMES uic-qt4 uic
+ NAMES uic-qt4 uic uic4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -1022,13 +1108,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
)
find_program(QT_LUPDATE_EXECUTABLE
- NAMES lupdate-qt4 lupdate
+ NAMES lupdate-qt4 lupdate lupdate4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_LRELEASE_EXECUTABLE
- NAMES lrelease-qt4 lrelease
+ NAMES lrelease-qt4 lrelease lrelease4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -1040,13 +1126,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
)
find_program(QT_DESIGNER_EXECUTABLE
- NAMES designer-qt4 designer
+ NAMES designer-qt4 designer designer4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_LINGUIST_EXECUTABLE
- NAMES linguist-qt4 linguist
+ NAMES linguist-qt4 linguist linguist4
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -1174,11 +1260,6 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
include("${_qt4_current_dir}/Qt4Macros.cmake")
- # set version variables
- string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
- string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
- string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
-
endif()
#support old QT_MIN_VERSION if set, but not if version is supplied by find_package()
diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake
index 4cae032..30d74ac 100644
--- a/Modules/FindSDL_image.cmake
+++ b/Modules/FindSDL_image.cmake
@@ -40,7 +40,7 @@ find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h
HINTS
ENV SDLIMAGEDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_IMAGE_LIBRARY AND SDLIMAGE_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_IMAGE_LIBRARY
HINTS
ENV SDLIMAGEDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_IMAGE_INCLUDE_DIR AND EXISTS "${SDL_IMAGE_INCLUDE_DIR}/SDL_image.h")
diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake
index 666fc6e..8ca7cc3 100644
--- a/Modules/FindSDL_mixer.cmake
+++ b/Modules/FindSDL_mixer.cmake
@@ -40,7 +40,7 @@ find_path(SDL_MIXER_INCLUDE_DIR SDL_mixer.h
HINTS
ENV SDLMIXERDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_MIXER_LIBRARY AND SDLMIXER_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_MIXER_LIBRARY
HINTS
ENV SDLMIXERDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_MIXER_INCLUDE_DIR AND EXISTS "${SDL_MIXER_INCLUDE_DIR}/SDL_mixer.h")
diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake
index d8f479f..ca707af 100644
--- a/Modules/FindSDL_net.cmake
+++ b/Modules/FindSDL_net.cmake
@@ -40,7 +40,7 @@ find_path(SDL_NET_INCLUDE_DIR SDL_net.h
HINTS
ENV SDLNETDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_NET_LIBRARY AND SDLNET_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_NET_LIBRARY
HINTS
ENV SDLNETDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_NET_INCLUDE_DIR AND EXISTS "${SDL_NET_INCLUDE_DIR}/SDL_net.h")
diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake
index 5ff50be..efd2658 100644
--- a/Modules/FindSDL_sound.cmake
+++ b/Modules/FindSDL_sound.cmake
@@ -77,7 +77,7 @@ find_path(SDL_SOUND_INCLUDE_DIR SDL_sound.h
HINTS
ENV SDLSOUNDDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
find_library(SDL_SOUND_LIBRARY
@@ -85,6 +85,7 @@ find_library(SDL_SOUND_LIBRARY
HINTS
ENV SDLSOUNDDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake
index 2cc5ee2..bb0ca91 100644
--- a/Modules/FindSDL_ttf.cmake
+++ b/Modules/FindSDL_ttf.cmake
@@ -40,7 +40,7 @@ find_path(SDL_TTF_INCLUDE_DIR SDL_ttf.h
HINTS
ENV SDLTTFDIR
ENV SDLDIR
- PATH_SUFFIXES SDL SDL12 SDL11
+ PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
if(NOT SDL_TTF_LIBRARY AND SDLTTF_LIBRARY)
@@ -52,6 +52,7 @@ find_library(SDL_TTF_LIBRARY
HINTS
ENV SDLTTFDIR
ENV SDLDIR
+ PATH_SUFFIXES lib
)
if(SDL_TTF_INCLUDE_DIR AND EXISTS "${SDL_TTF_INCLUDE_DIR}/SDL_ttf.h")
diff --git a/Modules/Platform/Darwin-Clang.cmake b/Modules/Platform/Darwin-Clang.cmake
index de7a856..528873c 100644
--- a/Modules/Platform/Darwin-Clang.cmake
+++ b/Modules/Platform/Darwin-Clang.cmake
@@ -19,6 +19,7 @@ endif()
set(__DARWIN_COMPILER_CLANG 1)
macro(__darwin_compiler_clang lang)
+ set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
set(CMAKE_${lang}_SYSROOT_FLAG "-isysroot")
diff --git a/Modules/Platform/Darwin-GNU.cmake b/Modules/Platform/Darwin-GNU.cmake
index d953503..5fee7e3 100644
--- a/Modules/Platform/Darwin-GNU.cmake
+++ b/Modules/Platform/Darwin-GNU.cmake
@@ -19,6 +19,7 @@ endif()
set(__DARWIN_COMPILER_GNU 1)
macro(__darwin_compiler_gnu lang)
+ set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
# GNU does not have -shared on OS X
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index ed0b8af..2e6b71e 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -256,6 +256,24 @@ set(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK
if(NOT DEFINED CMAKE_FIND_FRAMEWORK)
set(CMAKE_FIND_FRAMEWORK FIRST)
endif()
+
+# Older OS X linkers do not report their framework search path
+# with -v but "man ld" documents the following locations.
+set(CMAKE_PLATFORM_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
+ ${_CMAKE_OSX_SYSROOT_PATH}/Library/Frameworks
+ ${_CMAKE_OSX_SYSROOT_PATH}/System/Library/Frameworks
+ )
+if(_CMAKE_OSX_SYSROOT_PATH)
+ # Treat some paths as implicit so we do not override the SDK versions.
+ list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
+ /System/Library/Frameworks)
+endif()
+if("${_CURRENT_OSX_VERSION}" VERSION_LESS "10.5")
+ # Older OS X tools had more implicit paths.
+ list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES
+ ${_CMAKE_OSX_SYSROOT_PATH}/Network/Library/Frameworks)
+endif()
+
# set up the default search directories for frameworks
set(CMAKE_SYSTEM_FRAMEWORK_PATH
~/Library/Frameworks
diff --git a/Modules/WIX.template.in b/Modules/WIX.template.in
index 63fad7c..0bc7e10 100644
--- a/Modules/WIX.template.in
+++ b/Modules/WIX.template.in
@@ -24,6 +24,19 @@
<WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT"/>
+ <?ifdef CPACK_WIX_PRODUCT_ICON?>
+ <Property Id="ARPPRODUCTICON">ProductIcon.ico</Property>
+ <Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)"/>
+ <?endif?>
+
+ <?ifdef CPACK_WIX_UI_BANNER?>
+ <WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)"/>
+ <?endif?>
+
+ <?ifdef CPACK_WIX_UI_DIALOG?>
+ <WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)"/>
+ <?endif?>
+
<FeatureRef Id="ProductFeature"/>
<UIRef Id="WixUI_InstallDir" />