Commit e764474f authored by Wayne Stambaugh's avatar Wayne Stambaugh

CMake and other minor improvements.

* Merged CMake 2.8.4 version of FindwxWidgets.cmake with local copy.
* Merged CMake 2.8.4 version of UsewxWidgets.cmake with local copy.
* Bump required version of CMake to 2.8.0.
* Delete commented out include from eeschema/protos.h that I forgot on my
  last commit.
parent 3b55948d
...@@ -2,9 +2,9 @@ project(kicad) ...@@ -2,9 +2,9 @@ project(kicad)
# test the minimum Cmake version requirement (could be different under unix or Windows # test the minimum Cmake version requirement (could be different under unix or Windows
if(WIN32) if(WIN32)
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR) cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)
else(WIN32) else(WIN32)
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR) cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)
endif(WIN32) endif(WIN32)
# Path to local CMake modules. # Path to local CMake modules.
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# modules that you will use, you need to name them as components to # modules that you will use, you need to name them as components to
# the package: # the package:
# #
# FIND_PACKAGE(wxWidgets COMPONENTS base core ...) # FIND_PACKAGE(wxWidgets COMPONENTS core base ...)
# #
# There are two search branches: a windows style and a unix style. For # There are two search branches: a windows style and a unix style. For
# windows, the following variables are searched for and set to # windows, the following variables are searched for and set to
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
# (e.g., C:/wxWidgets-2.6.3/lib/vc_lib). # (e.g., C:/wxWidgets-2.6.3/lib/vc_lib).
# wxWidgets_CONFIGURATION - Configuration to use # wxWidgets_CONFIGURATION - Configuration to use
# (e.g., msw, mswd, mswu, mswunivud, etc.) # (e.g., msw, mswd, mswu, mswunivud, etc.)
# wxWidgets_EXCLUDE_COMMON_LIBRARIES
# - Set to TRUE to exclude linking of
# commonly required libs (e.g., png tiff
# jpeg zlib regex expat).
# #
# For unix style it uses the wx-config utility. You can select between # For unix style it uses the wx-config utility. You can select between
# debug/release, unicode/ansi, universal/non-universal, and # debug/release, unicode/ansi, universal/non-universal, and
...@@ -29,6 +33,13 @@ ...@@ -29,6 +33,13 @@
# wxWidgets_USE_UNIVERSAL # wxWidgets_USE_UNIVERSAL
# wxWidgets_USE_STATIC # wxWidgets_USE_STATIC
# #
# There is also a wxWidgets_CONFIG_OPTIONS variable for all other
# options that need to be passed to the wx-config utility. For
# example, to use the base toolkit found in the /usr/local path, set
# the variable (before calling the FIND_PACKAGE command) as such:
#
# SET(wxWidgets_CONFIG_OPTIONS --toolkit=base --prefix=/usr)
#
# The following are set after the configuration is done for both # The following are set after the configuration is done for both
# windows and unix style: # windows and unix style:
# #
...@@ -41,26 +52,43 @@ ...@@ -41,26 +52,43 @@
# rpath on UNIX. Typically an empty string # rpath on UNIX. Typically an empty string
# in WIN32 environment. # in WIN32 environment.
# wxWidgets_DEFINITIONS - Contains defines required to compile/link # wxWidgets_DEFINITIONS - Contains defines required to compile/link
# against WX, e.g. -DWXUSINGDLL # against WX, e.g. WXUSINGDLL
# wxWidgets_CXX_FLAGS - Include dirs and ompiler flags for # wxWidgets_DEFINITIONS_DEBUG- Contains defines required to compile/link
# unices, empty on WIN32. Esentially # against WX debug builds, e.g. __WXDEBUG__
# wxWidgets_CXX_FLAGS - Include dirs and compiler flags for
# unices, empty on WIN32. Essentially
# "`wx-config --cxxflags`". # "`wx-config --cxxflags`".
# wxWidgets_USE_FILE - Convenience include file. # wxWidgets_USE_FILE - Convenience include file.
# #
# Sample usage: # Sample usage:
# FIND_PACKAGE(wxWidgets COMPONENTS base core gl net) # # Note that for MinGW users the order of libs is important!
# FIND_PACKAGE(wxWidgets COMPONENTS net gl core base)
# IF(wxWidgets_FOUND) # IF(wxWidgets_FOUND)
# INCLUDE(${wxWidgets_USE_FILE}) # INCLUDE(${wxWidgets_USE_FILE})
# # and for each of your dependant executable/library targets: # # and for each of your dependent executable/library targets:
# TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES}) # TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
# ENDIF(wxWidgets_FOUND) # ENDIF(wxWidgets_FOUND)
# #
# If wxWidgets is required (i.e., not an optional part): # If wxWidgets is required (i.e., not an optional part):
# FIND_PACKAGE(wxWidgets REQUIRED base core gl net) # FIND_PACKAGE(wxWidgets REQUIRED net gl core base)
# INCLUDE(${wxWidgets_USE_FILE}) # INCLUDE(${wxWidgets_USE_FILE})
# # and for each of your dependant executable/library targets: # # and for each of your dependent executable/library targets:
# TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES}) # TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
# Copyright 2007-2009 Miguel A. Figueroa-Villanueva <miguelf at ieee dot org>
#
# 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.)
# #
# FIXME: check this and provide a correct sample usage... # FIXME: check this and provide a correct sample usage...
# Remember to connect back to the upper text. # Remember to connect back to the upper text.
...@@ -69,7 +97,6 @@ ...@@ -69,7 +97,6 @@
# FIND_PACKAGE(wxWidgets COMPONENTS mono) # FIND_PACKAGE(wxWidgets COMPONENTS mono)
# ... # ...
# NOTES # NOTES
# #
# This module has been tested on the WIN32 platform with wxWidgets # This module has been tested on the WIN32 platform with wxWidgets
...@@ -169,7 +196,7 @@ IF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") ...@@ -169,7 +196,7 @@ IF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
SET(wxWidgets_USE_FILE SET(wxWidgets_USE_FILE
"${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
ELSE(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") ELSE(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
SET(wxWidgets_USE_FILE UsewxWidgets.cmake) SET(wxWidgets_USE_FILE UsewxWidgets)
ENDIF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") ENDIF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake")
#===================================================================== #=====================================================================
...@@ -194,12 +221,16 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -194,12 +221,16 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
IF(wxWidgets_USE_MONOLITHIC) IF(wxWidgets_USE_MONOLITHIC)
SET(wxWidgets_FIND_COMPONENTS mono) SET(wxWidgets_FIND_COMPONENTS mono)
ELSE(wxWidgets_USE_MONOLITHIC) ELSE(wxWidgets_USE_MONOLITHIC)
SET(wxWidgets_FIND_COMPONENTS base core) # this is default SET(wxWidgets_FIND_COMPONENTS core base) # this is default
ENDIF(wxWidgets_USE_MONOLITHIC) ENDIF(wxWidgets_USE_MONOLITHIC)
ENDIF(NOT wxWidgets_FIND_COMPONENTS) ENDIF(NOT wxWidgets_FIND_COMPONENTS)
# Always add the common required libs. # Add the common (usually required libs) unless
LIST(APPEND wxWidgets_FIND_COMPONENTS ${wxWidgets_COMMON_LIBRARIES}) # wxWidgets_EXCLUDE_COMMON_LIBRARIES has been set.
IF(NOT wxWidgets_EXCLUDE_COMMON_LIBRARIES)
LIST(APPEND wxWidgets_FIND_COMPONENTS
${wxWidgets_COMMON_LIBRARIES})
ENDIF(NOT wxWidgets_EXCLUDE_COMMON_LIBRARIES)
#------------------------------------------------------------------- #-------------------------------------------------------------------
# WIN32: Helper MACROS # WIN32: Helper MACROS
...@@ -229,7 +260,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -229,7 +260,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
# FIXME: What if both regex libs are available. regex should be # FIXME: What if both regex libs are available. regex should be
# found outside the loop and only wx${LIB}${_UCD}${_DBG}. # found outside the loop and only wx${LIB}${_UCD}${_DBG}.
# Find wxWidgets common libraries. # Find wxWidgets common libraries.
FOREACH(LIB ${wxWidgets_COMMON_LIBRARIES}) FOREACH(LIB ${wxWidgets_COMMON_LIBRARIES} scintilla)
FIND_LIBRARY(WX_${LIB}${_DBG} FIND_LIBRARY(WX_${LIB}${_DBG}
NAMES NAMES
wx${LIB}${_UCD}${_DBG} # for regex wx${LIB}${_UCD}${_DBG} # for regex
...@@ -280,7 +311,8 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -280,7 +311,8 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
MARK_AS_ADVANCED(WX_mono${_DBG}) MARK_AS_ADVANCED(WX_mono${_DBG})
# Find wxWidgets multilib libraries. # Find wxWidgets multilib libraries.
FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext) FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext
stc ribbon propgrid)
FIND_LIBRARY(WX_${LIB}${_DBG} FIND_LIBRARY(WX_${LIB}${_DBG}
NAMES NAMES
wxmsw${_UNV}29${_UCD}${_DBG}_${LIB} wxmsw${_UNV}29${_UCD}${_DBG}_${LIB}
...@@ -307,7 +339,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -307,7 +339,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
# Clear all debug or release library paths (arguments are "d" or ""). # Clear all debug or release library paths (arguments are "d" or "").
MACRO(WX_CLEAR_ALL_LIBS _DBG) MACRO(WX_CLEAR_ALL_LIBS _DBG)
# Clear wxWidgets common libraries. # Clear wxWidgets common libraries.
FOREACH(LIB ${wxWidgets_COMMON_LIBRARIES}) FOREACH(LIB ${wxWidgets_COMMON_LIBRARIES} scintilla)
WX_CLEAR_LIB(WX_${LIB}${_DBG}) WX_CLEAR_LIB(WX_${LIB}${_DBG})
ENDFOREACH(LIB) ENDFOREACH(LIB)
...@@ -321,7 +353,8 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -321,7 +353,8 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
WX_CLEAR_LIB(WX_mono${_DBG}) WX_CLEAR_LIB(WX_mono${_DBG})
# Clear wxWidgets multilib libraries. # Clear wxWidgets multilib libraries.
FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext) FOREACH(LIB core adv aui html media xrc dbgrid gl qa richtext
stc ribbon propgrid)
WX_CLEAR_LIB(WX_${LIB}${_DBG}) WX_CLEAR_LIB(WX_${LIB}${_DBG})
ENDFOREACH(LIB) ENDFOREACH(LIB)
ENDMACRO(WX_CLEAR_ALL_LIBS) ENDMACRO(WX_CLEAR_ALL_LIBS)
...@@ -413,7 +446,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -413,7 +446,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
wxWidgets-2.7.4 wxWidgets-2.7.4
wxWidgets-2.7.3 wxWidgets-2.7.3
wxWidgets-2.7.2 wxWidgets-2.7.2
wxWidgest-2.7.1 wxWidgets-2.7.1
wxWidgets-2.7.0 wxWidgets-2.7.0
wxWidgets-2.7.0-1 wxWidgets-2.7.0-1
wxWidgets-2.6.4 wxWidgets-2.6.4
...@@ -491,7 +524,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -491,7 +524,7 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
IF(WX_LIB_DIR) IF(WX_LIB_DIR)
# If building shared libs, define WXUSINGDLL to use dllimport. # If building shared libs, define WXUSINGDLL to use dllimport.
IF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") IF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*")
SET(wxWidgets_DEFINITIONS "-DWXUSINGDLL") SET(wxWidgets_DEFINITIONS WXUSINGDLL)
DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}") DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}")
ENDIF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") ENDIF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*")
...@@ -538,28 +571,23 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -538,28 +571,23 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
# Get configuration parameters from the name. # Get configuration parameters from the name.
WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG) WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG)
# Set wxWidgets lib setup include directory.
IF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
SET(wxWidgets_INCLUDE_DIRS
${WX_LIB_DIR}/${wxWidgets_CONFIGURATION})
ELSE(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
DBG_MSG("wxWidgets_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.")
SET(wxWidgets_FOUND FALSE)
ENDIF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
# Set wxWidgets main include directory. # Set wxWidgets main include directory.
IF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) IF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
SET(wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include) LIST(APPEND wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include)
ELSE(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) ELSE(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
DBG_MSG("wxWidgets_FOUND FALSE because WX_ROOT_DIR=${WX_ROOT_DIR} has no ${WX_ROOT_DIR}/include/wx/wx.h") DBG_MSG("wxWidgets_FOUND FALSE because WX_ROOT_DIR=${WX_ROOT_DIR} has no ${WX_ROOT_DIR}/include/wx/wx.h")
SET(wxWidgets_FOUND FALSE) SET(wxWidgets_FOUND FALSE)
ENDIF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) ENDIF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h)
# Set wxWidgets lib setup include directory before the main include
# directory to prevent Visual Studio 2005 manifest build and link
# errors. For more information, see the Manifest section at:
#
# http://www.wxart2d.org/moin/WxArt2dInstall
#
IF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
LIST(INSERT wxWidgets_INCLUDE_DIRS 0
${WX_LIB_DIR}/${wxWidgets_CONFIGURATION})
ELSE(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
DBG_MSG("WXWIDGET_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.")
SET(wxWidgets_FOUND FALSE)
ENDIF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
# Find wxWidgets libraries. # Find wxWidgets libraries.
WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}") WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}")
IF(WX_USE_REL_AND_DBG) IF(WX_USE_REL_AND_DBG)
...@@ -569,6 +597,14 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -569,6 +597,14 @@ IF(wxWidgets_FIND_STYLE STREQUAL "win32")
# Settings for requested libs (i.e., include dir, libraries, etc.). # Settings for requested libs (i.e., include dir, libraries, etc.).
WX_SET_LIBRARIES(wxWidgets_FIND_COMPONENTS "${DBG}") WX_SET_LIBRARIES(wxWidgets_FIND_COMPONENTS "${DBG}")
# Add necessary definitions for unicode builds
IF("${UCD}" STREQUAL "u")
LIST(APPEND wxWidgets_DEFINITIONS UNICODE _UNICODE)
ENDIF("${UCD}" STREQUAL "u")
# Add necessary definitions for debug builds
SET(wxWidgets_DEFINITIONS_DEBUG _DEBUG __WXDEBUG__)
ENDIF(WX_CONFIGURATION) ENDIF(WX_CONFIGURATION)
ENDIF(WX_LIB_DIR) ENDIF(WX_LIB_DIR)
ENDIF(WX_ROOT_DIR) ENDIF(WX_ROOT_DIR)
...@@ -586,7 +622,8 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -586,7 +622,8 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32")
# #
MACRO(WX_CONFIG_SELECT_GET_DEFAULT) MACRO(WX_CONFIG_SELECT_GET_DEFAULT)
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --selected-config COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
${wxWidgets_CONFIG_OPTIONS} --selected-config
OUTPUT_VARIABLE _wx_selected_config OUTPUT_VARIABLE _wx_selected_config
RESULT_VARIABLE _wx_result RESULT_VARIABLE _wx_result
ERROR_QUIET ERROR_QUIET
...@@ -614,13 +651,15 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -614,13 +651,15 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32")
# #
MACRO(WX_CONFIG_SELECT_QUERY_BOOL _OPT_NAME _OPT_HELP) MACRO(WX_CONFIG_SELECT_QUERY_BOOL _OPT_NAME _OPT_HELP)
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --${_OPT_NAME}=yes COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
${wxWidgets_CONFIG_OPTIONS} --${_OPT_NAME}=yes
RESULT_VARIABLE _wx_result_yes RESULT_VARIABLE _wx_result_yes
OUTPUT_QUIET OUTPUT_QUIET
ERROR_QUIET ERROR_QUIET
) )
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --${_OPT_NAME}=no COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
${wxWidgets_CONFIG_OPTIONS} --${_OPT_NAME}=no
RESULT_VARIABLE _wx_result_no RESULT_VARIABLE _wx_result_no
OUTPUT_QUIET OUTPUT_QUIET
ERROR_QUIET ERROR_QUIET
...@@ -646,7 +685,7 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -646,7 +685,7 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32")
# among multiple builds. # among multiple builds.
# #
MACRO(WX_CONFIG_SELECT_SET_OPTIONS) MACRO(WX_CONFIG_SELECT_SET_OPTIONS)
SET(wxWidgets_SELECT_OPTIONS "") SET(wxWidgets_SELECT_OPTIONS ${wxWidgets_CONFIG_OPTIONS})
FOREACH(_opt_name debug static unicode universal) FOREACH(_opt_name debug static unicode universal)
STRING(TOUPPER ${_opt_name} _upper_opt_name) STRING(TOUPPER ${_opt_name} _upper_opt_name)
IF(DEFINED wxWidgets_USE_${_upper_opt_name}) IF(DEFINED wxWidgets_USE_${_upper_opt_name})
...@@ -697,11 +736,16 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -697,11 +736,16 @@ ELSE(wxWidgets_FIND_STYLE STREQUAL "win32")
DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
# parse definitions from cxxflags; drop -D* from CXXFLAGS # parse definitions from cxxflags;
# drop -D* from CXXFLAGS and the -D prefix
STRING(REGEX MATCHALL "-D[^;]+" STRING(REGEX MATCHALL "-D[^;]+"
wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}") wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}")
STRING(REGEX REPLACE "-D[^;]+;" "" STRING(REGEX REPLACE "-D[^;]+(;|$)" ""
wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
STRING(REGEX REPLACE ";$" ""
wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}")
STRING(REPLACE "-D" ""
wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}")
# parse include dirs from cxxflags; drop -I prefix # parse include dirs from cxxflags; drop -I prefix
STRING(REGEX MATCHALL "-I[^;]+" STRING(REGEX MATCHALL "-I[^;]+"
......
# - Convenience include for using wxWidgets library # - Convenience include for using wxWidgets library.
# Finds if wxWidgets is installed # Determines if wxWidgets was FOUND and sets the appropriate libs, incdirs,
# and set the appropriate libs, incdirs, flags etc. # flags, etc. INCLUDE_DIRECTORIES and LINK_DIRECTORIES are called.
# INCLUDE_DIRECTORIES, LINK_DIRECTORIES and ADD_DEFINITIONS
# are called.
# #
# USAGE # USAGE
# SET( wxWidgets_USE_LIBS gl xml xrc ) # optionally: more than wx std libs # # Note that for MinGW users the order of libs is important!
# FIND_PACKAGE(wxWidgets REQUIRED) # FIND_PACKAGE(wxWidgets REQUIRED net gl core base)
# INCLUDE( ${xWidgets_USE_FILE} ) # INCLUDE(${wxWidgets_USE_FILE})
# ... add your targets here, e.g. ADD_EXECUTABLE/ ADD_LIBRARY ... # # and for each of your dependant executable/library targets:
# TARGET_LINK_LIBRARIERS( <yourWxDependantTarget> ${wxWidgets_LIBRARIES}) # TARGET_LINK_LIBRARIES(<YourTarget> ${wxWidgets_LIBRARIES})
# #
# DEPRECATED # DEPRECATED
# LINK_LIBRARIES is not called in favor of adding dependencies per target. # LINK_LIBRARIES is not called in favor of adding dependencies per target.
...@@ -17,6 +15,19 @@ ...@@ -17,6 +15,19 @@
# AUTHOR # AUTHOR
# Jan Woetzel <jw -at- mip.informatik.uni-kiel.de> # Jan Woetzel <jw -at- mip.informatik.uni-kiel.de>
#=============================================================================
# Copyright 2004-2009 Kitware, Inc.
# Copyright 2006 Jan Woetzel
#
# 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.)
# debug message and logging. # debug message and logging.
# comment these out for distribution # comment these out for distribution
...@@ -46,10 +57,17 @@ IF (wxWidgets_FOUND) ...@@ -46,10 +57,17 @@ IF (wxWidgets_FOUND)
ENDIF(wxWidgets_LIBRARY_DIRS) ENDIF(wxWidgets_LIBRARY_DIRS)
IF (wxWidgets_DEFINITIONS) IF (wxWidgets_DEFINITIONS)
ADD_DEFINITIONS( ${wxWidgets_DEFINITIONS} ) SET_PROPERTY(DIRECTORY APPEND
PROPERTY COMPILE_DEFINITIONS ${wxWidgets_DEFINITIONS})
MSG("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}") MSG("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}")
ENDIF(wxWidgets_DEFINITIONS) ENDIF(wxWidgets_DEFINITIONS)
IF (wxWidgets_DEFINITIONS_DEBUG)
SET_PROPERTY(DIRECTORY APPEND
PROPERTY COMPILE_DEFINITIONS_DEBUG ${wxWidgets_DEFINITIONS_DEBUG})
MSG("wxWidgets_DEFINITIONS_DEBUG=${wxWidgets_DEFINITIONS_DEBUG}")
ENDIF(wxWidgets_DEFINITIONS_DEBUG)
IF (wxWidgets_CXX_FLAGS) IF (wxWidgets_CXX_FLAGS)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}")
MSG("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") MSG("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#ifndef __PROTOS_H__ #ifndef __PROTOS_H__
#define __PROTOS_H__ #define __PROTOS_H__
//#include "class_undoredo_container.h"
#include "colors.h" #include "colors.h"
......
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