summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBacktrace.cmake91
-rw-r--r--Modules/FindSDL.cmake10
-rw-r--r--Modules/FindSDL_image.cmake8
-rw-r--r--Modules/FindSDL_mixer.cmake8
-rw-r--r--Modules/FindSDL_net.cmake8
-rw-r--r--Modules/FindSDL_sound.cmake2
-rw-r--r--Modules/FindSDL_ttf.cmake8
-rw-r--r--Modules/FindSWIG.cmake2
-rw-r--r--Modules/FindwxWidgets.cmake6
-rw-r--r--Modules/Platform/UnixPaths.cmake6
-rw-r--r--Modules/Platform/WindowsPaths.cmake11
11 files changed, 153 insertions, 7 deletions
diff --git a/Modules/FindBacktrace.cmake b/Modules/FindBacktrace.cmake
new file mode 100644
index 0000000..56e739e
--- /dev/null
+++ b/Modules/FindBacktrace.cmake
@@ -0,0 +1,91 @@
+#.rst:
+# FindBacktrace
+# -------------
+#
+# Find provider for backtrace(3).
+#
+# Checks if OS supports backtrace(3) via either libc or custom library.
+# This module defines the following variables::
+#
+# Backtrace_HEADER - The header file needed for backtrace(3). Cached.
+# Could be forcibly set by user.
+# Backtrace_INCLUDE_DIRS - The include directories needed to use backtrace(3) header.
+# Backtrace_LIBRARIES - The libraries (linker flags) needed to use backtrace(3), if any.
+# Backtrace_FOUND - Is set if and only if backtrace(3) support detected.
+#
+# The following cache variables are also available to set or use::
+#
+# Backtrace_LIBRARY - The external library providing backtrace, if any.
+# Backtrace_INCLUDE_DIR - The directory holding the backtrace(3) header.
+#
+# Typical usage is to generate of header file using configure_file() with the
+# contents like the following::
+#
+# #cmakedefine01 Backtrace_FOUND
+# #if Backtrace_FOUND
+# # include <${Backtrace_HEADER}>
+# #endif
+#
+# And then reference that generated header file in actual source.
+
+#=============================================================================
+# Copyright 2013 Vadim Zhukov
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+
+include(CMakePushCheckState)
+include(CheckSymbolExists)
+include(FindPackageHandleStandardArgs)
+
+# List of variables to be provided to find_package_handle_standard_args()
+set(_Backtrace_STD_ARGS Backtrace_INCLUDE_DIR)
+
+if(Backtrace_HEADER)
+ set(_Backtrace_HEADER_TRY "${Backtrace_HEADER}")
+else(Backtrace_HEADER)
+ set(_Backtrace_HEADER_TRY "execinfo.h")
+endif(Backtrace_HEADER)
+
+find_path(Backtrace_INCLUDE_DIR "${_Backtrace_HEADER_TRY}")
+set(Backtrace_INCLUDE_DIRS ${Backtrace_INCLUDE_DIR})
+
+# First, check if we already have backtrace(), e.g., in libc
+cmake_push_check_state(RESET)
+set(CMAKE_REQUIRED_INCLUDES ${Backtrace_INCLUDE_DIRS})
+check_symbol_exists("backtrace" "${_Backtrace_HEADER_TRY}" _Backtrace_SYM_FOUND)
+cmake_pop_check_state()
+
+if(_Backtrace_SYM_FOUND)
+ set(Backtrace_LIBRARY)
+ if(NOT Backtrace_FIND_QUIETLY)
+ message(STATUS "backtrace facility detected in default set of libraries")
+ endif()
+else()
+ # Check for external library, for non-glibc systems
+ if(Backtrace_INCLUDE_DIR)
+ # OpenBSD has libbacktrace renamed to libexecinfo
+ find_library(Backtrace_LIBRARY "execinfo")
+ elseif() # respect user wishes
+ set(_Backtrace_HEADER_TRY "backtrace.h")
+ find_path(Backtrace_INCLUDE_DIR ${_Backtrace_HEADER_TRY})
+ find_library(Backtrace_LIBRARY "backtrace")
+ endif()
+
+ # Prepend list with library path as it's more common practice
+ set(_Backtrace_STD_ARGS Backtrace_LIBRARY ${_Backtrace_STD_ARGS})
+endif()
+
+set(Backtrace_LIBRARIES ${Backtrace_LIBRARY})
+set(Backtrace_HEADER "${_Backtrace_HEADER_TRY}" CACHE STRING "Header providing backtrace(3) facility")
+
+find_package_handle_standard_args(Backtrace FOUND_VAR Backtrace_FOUND REQUIRED_VARS ${_Backtrace_STD_ARGS})
+mark_as_advanced(Backtrace_HEADER Backtrace_INCLUDE_DIR Backtrace_LIBRARY)
diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake
index 6d418fd..ec1f881 100644
--- a/Modules/FindSDL.cmake
+++ b/Modules/FindSDL.cmake
@@ -90,13 +90,19 @@ find_path(SDL_INCLUDE_DIR SDL.h
include/SDL include/SDL12 include/SDL11 include
)
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(VC_LIB_PATH_SUFFIX lib/x64)
+else()
+ set(VC_LIB_PATH_SUFFIX lib/x86)
+endif()
+
# SDL-1.1 is the name used by FreeBSD ports...
# don't confuse it for the version number.
find_library(SDL_LIBRARY_TEMP
NAMES SDL SDL-1.1
HINTS
ENV SDLDIR
- PATH_SUFFIXES lib
+ PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
)
if(NOT SDL_BUILDING_LIBRARY)
@@ -109,7 +115,7 @@ if(NOT SDL_BUILDING_LIBRARY)
NAMES SDLmain SDLmain-1.1
HINTS
ENV SDLDIR
- PATH_SUFFIXES lib
+ PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
PATHS
/sw
/opt/local
diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake
index 2ec6e50..e5173e3 100644
--- a/Modules/FindSDL_image.cmake
+++ b/Modules/FindSDL_image.cmake
@@ -57,6 +57,12 @@ find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h
PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(VC_LIB_PATH_SUFFIX lib/x64)
+else()
+ set(VC_LIB_PATH_SUFFIX lib/x86)
+endif()
+
if(NOT SDL_IMAGE_LIBRARY AND SDLIMAGE_LIBRARY)
set(SDL_IMAGE_LIBRARY ${SDLIMAGE_LIBRARY} CACHE FILEPATH "file cache entry
initialized from old variable name")
@@ -66,7 +72,7 @@ find_library(SDL_IMAGE_LIBRARY
HINTS
ENV SDLIMAGEDIR
ENV SDLDIR
- PATH_SUFFIXES lib
+ PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
)
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 d17c907..8f2f066 100644
--- a/Modules/FindSDL_mixer.cmake
+++ b/Modules/FindSDL_mixer.cmake
@@ -57,6 +57,12 @@ find_path(SDL_MIXER_INCLUDE_DIR SDL_mixer.h
PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(VC_LIB_PATH_SUFFIX lib/x64)
+else()
+ set(VC_LIB_PATH_SUFFIX lib/x86)
+endif()
+
if(NOT SDL_MIXER_LIBRARY AND SDLMIXER_LIBRARY)
set(SDL_MIXER_LIBRARY ${SDLMIXER_LIBRARY} CACHE FILEPATH "file cache entry
initialized from old variable name")
@@ -66,7 +72,7 @@ find_library(SDL_MIXER_LIBRARY
HINTS
ENV SDLMIXERDIR
ENV SDLDIR
- PATH_SUFFIXES lib
+ PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
)
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 c545189..e5c2cdb 100644
--- a/Modules/FindSDL_net.cmake
+++ b/Modules/FindSDL_net.cmake
@@ -57,6 +57,12 @@ find_path(SDL_NET_INCLUDE_DIR SDL_net.h
PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(VC_LIB_PATH_SUFFIX lib/x64)
+else()
+ set(VC_LIB_PATH_SUFFIX lib/x86)
+endif()
+
if(NOT SDL_NET_LIBRARY AND SDLNET_LIBRARY)
set(SDL_NET_LIBRARY ${SDLNET_LIBRARY} CACHE FILEPATH "file cache entry
initialized from old variable name")
@@ -66,7 +72,7 @@ find_library(SDL_NET_LIBRARY
HINTS
ENV SDLNETDIR
ENV SDLDIR
- PATH_SUFFIXES lib
+ PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
)
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 863699a..3a6ab7b 100644
--- a/Modules/FindSDL_sound.cmake
+++ b/Modules/FindSDL_sound.cmake
@@ -106,7 +106,7 @@ find_library(SDL_SOUND_LIBRARY
HINTS
ENV SDLSOUNDDIR
ENV SDLDIR
- PATH_SUFFIXES lib
+ PATH_SUFFIXES lib VisualC/win32lib
)
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 8f72b1a..3f58ac1 100644
--- a/Modules/FindSDL_ttf.cmake
+++ b/Modules/FindSDL_ttf.cmake
@@ -57,6 +57,12 @@ find_path(SDL_TTF_INCLUDE_DIR SDL_ttf.h
PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include
)
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(VC_LIB_PATH_SUFFIX lib/x64)
+else()
+ set(VC_LIB_PATH_SUFFIX lib/x86)
+endif()
+
if(NOT SDL_TTF_LIBRARY AND SDLTTF_LIBRARY)
set(SDL_TTF_LIBRARY ${SDLTTF_LIBRARY} CACHE FILEPATH "file cache entry
initialized from old variable name")
@@ -66,7 +72,7 @@ find_library(SDL_TTF_LIBRARY
HINTS
ENV SDLTTFDIR
ENV SDLDIR
- PATH_SUFFIXES lib
+ PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
)
if(SDL_TTF_INCLUDE_DIR AND EXISTS "${SDL_TTF_INCLUDE_DIR}/SDL_ttf.h")
diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake
index f7ad2f5..f27c990 100644
--- a/Modules/FindSWIG.cmake
+++ b/Modules/FindSWIG.cmake
@@ -75,3 +75,5 @@ endif()
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SWIG REQUIRED_VARS SWIG_EXECUTABLE SWIG_DIR
VERSION_VAR SWIG_VERSION )
+
+mark_as_advanced(SWIG_DIR SWIG_VERSION)
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index 4ecab62..3c664e7 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -303,6 +303,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
# Find wxWidgets multilib base libraries.
find_library(WX_base${_DBG}
NAMES
+ wxbase30${_UCD}${_DBG}
wxbase29${_UCD}${_DBG}
wxbase28${_UCD}${_DBG}
wxbase27${_UCD}${_DBG}
@@ -315,6 +316,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
foreach(LIB net odbc xml)
find_library(WX_${LIB}${_DBG}
NAMES
+ wxbase30${_UCD}${_DBG}_${LIB}
wxbase29${_UCD}${_DBG}_${LIB}
wxbase28${_UCD}${_DBG}_${LIB}
wxbase27${_UCD}${_DBG}_${LIB}
@@ -329,6 +331,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
# Find wxWidgets monolithic library.
find_library(WX_mono${_DBG}
NAMES
+ wxmsw${_UNV}30${_UCD}${_DBG}
wxmsw${_UNV}29${_UCD}${_DBG}
wxmsw${_UNV}28${_UCD}${_DBG}
wxmsw${_UNV}27${_UCD}${_DBG}
@@ -344,6 +347,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
stc ribbon propgrid webview)
find_library(WX_${LIB}${_DBG}
NAMES
+ wxmsw${_UNV}30${_UCD}${_DBG}_${LIB}
wxmsw${_UNV}29${_UCD}${_DBG}_${LIB}
wxmsw${_UNV}28${_UCD}${_DBG}_${LIB}
wxmsw${_UNV}27${_UCD}${_DBG}_${LIB}
@@ -457,6 +461,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
D:/
ENV ProgramFiles
PATH_SUFFIXES
+ wxWidgets-3.0.0
+ wxWidgets-2.9.5
wxWidgets-2.9.4
wxWidgets-2.9.3
wxWidgets-2.9.2
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index 7a424c4..eca3280 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -43,6 +43,12 @@ if (NOT CMAKE_FIND_NO_INSTALL_PREFIX)
# Project install destination.
"${CMAKE_INSTALL_PREFIX}"
)
+ if(CMAKE_STAGING_PREFIX)
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
+ # User-supplied staging prefix.
+ "${CMAKE_STAGING_PREFIX}"
+ )
+ endif()
endif()
# List common include file locations not under the common prefixes.
diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake
index c231495..3240c23 100644
--- a/Modules/Platform/WindowsPaths.cmake
+++ b/Modules/Platform/WindowsPaths.cmake
@@ -79,6 +79,12 @@ if (NOT CMAKE_FIND_NO_INSTALL_PREFIX)
# Project install destination.
"${CMAKE_INSTALL_PREFIX}"
)
+ if (CMAKE_STAGING_PREFIX)
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
+ # User-supplied staging prefix.
+ "${CMAKE_STAGING_PREFIX}"
+ )
+ endif()
endif()
if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
@@ -94,6 +100,11 @@ if (NOT CMAKE_FIND_NO_INSTALL_PREFIX)
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
"${CMAKE_INSTALL_PREFIX}/bin"
)
+ if (CMAKE_STAGING_PREFIX)
+ list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
+ "${CMAKE_STAGING_PREFIX}/bin"
+ )
+ endif()
endif()
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
"${_CMAKE_INSTALL_DIR}/bin"