|
|
@@ -1,70 +1,64 @@
|
|
|
-##
|
|
|
-## This module finds if wxWindows is installed and determines where the
|
|
|
-## include files and libraries are. It also determines what the name of
|
|
|
-## the library is. This code sets the following variables:
|
|
|
-##
|
|
|
-## ------------------------------------------------------------------
|
|
|
-##
|
|
|
-## WXWINDOWS_FOUND = system has WxWindows (in desired config. build)
|
|
|
-##
|
|
|
-## WXWINDOWS_LIBRARIES = full path to the wxWindows libraries
|
|
|
-## on Unix/Linux with additional linker flags from
|
|
|
-## "wx-config --libs"
|
|
|
-##
|
|
|
-## CMAKE_WXWINDOWS_CXX_FLAGS = Unix compiler flags for wxWindows, essentially
|
|
|
-## "`wx-config --cxxflags`"
|
|
|
-##
|
|
|
-## WXWINDOWS_INCLUDE_DIR = where to find headers "wx/wx.h" "wx/setup.h"
|
|
|
-##
|
|
|
-## WXWINDOWS_LINK_DIRECTORIES = link directories, useful for rpath on Unix
|
|
|
-##
|
|
|
-## WXWINDOWS_DEFINITIONS = extra defines
|
|
|
-##
|
|
|
-## deprecated:
|
|
|
-## * CMAKE_WX_CAN_COMPILE
|
|
|
-## * WXWINDOWS_LIBRARY
|
|
|
-## * CMAKE_WX_CXX_FLAGS
|
|
|
-## * WXWINDOWS_INCLUDE_PATH
|
|
|
-##
|
|
|
-## ------------------------------------------------------------------
|
|
|
-##
|
|
|
-## USAGE:
|
|
|
-## # for convenience include Use_wxWindows.cmake in your projects
|
|
|
-## CMakeLists.txt:
|
|
|
-##
|
|
|
-## # if you need OpenGL support please
|
|
|
-## SET(WXWINDOWS_USE_GL 1)
|
|
|
-## # in your CMakeLists.txt *before* you include this file.
|
|
|
-##
|
|
|
-## # just include Use_wxWindows.cmake
|
|
|
-## # in your projects CMakeLists.txt
|
|
|
-## INCLUDE(Use_wxWindows)
|
|
|
-##
|
|
|
-## ------------------------------------------------------------------
|
|
|
-## Author Jan Woetzel <http://www.mip.informatik.uni-kiel.de/~jw> (07/2003)
|
|
|
-## ------------------------------------------------------------------
|
|
|
-##
|
|
|
-## -changed variable names to conventions from cmakes readme.txt (Jan Woetzel
|
|
|
-## 07/07/2003)
|
|
|
-## -added definition WINVER for WIN32 (Jan Woetzel 07/07//2003)
|
|
|
-## -added IF(CMAKE_WXWINDOWS_CONFIG_EXECUTABLE) found and changed
|
|
|
-## CMAKE_WX_CONFIG to CMAKE_WXWINDOWS_CONFIG_EXECUTABLE (Jan Woetzel
|
|
|
-## 07/22/2003)
|
|
|
-## -removed OPTION for CMAKE_WXWINDOWS_USE_GL. Force the developer to SET it.
|
|
|
-##
|
|
|
-## status:
|
|
|
-## tested with:
|
|
|
-## -cmake 1.6.7, Linux (Suse 7.3), wxWindows 2.4.0, gcc 2.95
|
|
|
-## -cmake 1.6.7, Linux (Suse 8.2), wxWindows 2.4.0, gcc 3.3
|
|
|
-## -cmake 1.6.7, Linux (Suse 8.2), wxWindows 2.4.1-patch1, gcc 3.3
|
|
|
-## -cmake 1.6.7, MS Windows XP home, wxWindows 2.4.1, MS Visual Studio .net 7
|
|
|
-## 2002 (static build)
|
|
|
-##
|
|
|
-## TODO:
|
|
|
-## -OPTION for unicode builds
|
|
|
-## -change WXWINDOWS_USE_GL to use FindOpenGL.cmake or let the user do it
|
|
|
-## -testing of DLL linking under MS WIN32
|
|
|
-##
|
|
|
+# - Find wxWindows installation
|
|
|
+# This module finds if wxWindows is installed and determines where the
|
|
|
+# include files and libraries are. It also determines what the name of
|
|
|
+# the library is. This code sets the following variables:
|
|
|
+#
|
|
|
+# WXWINDOWS_FOUND = system has WxWindows
|
|
|
+# WXWINDOWS_LIBRARIES = full path to the wxWindows libraries
|
|
|
+# on Unix/Linux with additional linker
|
|
|
+# flags from "wx-config --libs"
|
|
|
+# CMAKE_WXWINDOWS_CXX_FLAGS = Compiler flags for wxWindows,
|
|
|
+# essentially
|
|
|
+# "`wx-config --cxxflags`"
|
|
|
+# WXWINDOWS_INCLUDE_DIR = where to find "wx/wx.h"
|
|
|
+# "wx/setup.h"
|
|
|
+# WXWINDOWS_LINK_DIRECTORIES = link directories
|
|
|
+# WXWINDOWS_DEFINITIONS = extra defines
|
|
|
+# deprecated:
|
|
|
+# * CMAKE_WX_CAN_COMPILE
|
|
|
+# * WXWINDOWS_LIBRARY
|
|
|
+# * CMAKE_WX_CXX_FLAGS
|
|
|
+# * WXWINDOWS_INCLUDE_PATH
|
|
|
+#
|
|
|
+# USAGE:
|
|
|
+# for convenience include Use_wxWindows.cmake in your projects
|
|
|
+# CMakeLists.txt:
|
|
|
+#
|
|
|
+# if you need OpenGL support please
|
|
|
+# SET(WXWINDOWS_USE_GL 1)
|
|
|
+# # in your CMakeLists.txt *before* you include this file.
|
|
|
+#
|
|
|
+# # just include Use_wxWindows.cmake
|
|
|
+# # in your projects CMakeLists.txt
|
|
|
+# INCLUDE(Use_wxWindows)
|
|
|
+#
|
|
|
+
|
|
|
+
|
|
|
+# ------------------------------------------------------------------
|
|
|
+# Author Jan Woetzel <http://www.mip.informatik.uni-kiel.de/~jw> (07/2003)
|
|
|
+# ------------------------------------------------------------------
|
|
|
+#
|
|
|
+# -changed variable names to conventions from cmakes readme.txt (Jan Woetzel
|
|
|
+# 07/07/2003)
|
|
|
+# -added definition WINVER for WIN32 (Jan Woetzel 07/07//2003)
|
|
|
+# -added IF(CMAKE_WXWINDOWS_CONFIG_EXECUTABLE) found and changed
|
|
|
+# CMAKE_WX_CONFIG to CMAKE_WXWINDOWS_CONFIG_EXECUTABLE (Jan Woetzel
|
|
|
+# 07/22/2003)
|
|
|
+# -removed OPTION for CMAKE_WXWINDOWS_USE_GL. Force the developer to SET it.
|
|
|
+#
|
|
|
+# status:
|
|
|
+# tested with:
|
|
|
+# -cmake 1.6.7, Linux (Suse 7.3), wxWindows 2.4.0, gcc 2.95
|
|
|
+# -cmake 1.6.7, Linux (Suse 8.2), wxWindows 2.4.0, gcc 3.3
|
|
|
+# -cmake 1.6.7, Linux (Suse 8.2), wxWindows 2.4.1-patch1, gcc 3.3
|
|
|
+# -cmake 1.6.7, MS Windows XP home, wxWindows 2.4.1, MS Visual Studio .net 7
|
|
|
+# 2002 (static build)
|
|
|
+#
|
|
|
+# TODO:
|
|
|
+# -OPTION for unicode builds
|
|
|
+# -change WXWINDOWS_USE_GL to use FindOpenGL.cmake or let the user do it
|
|
|
+# -testing of DLL linking under MS WIN32
|
|
|
+#
|
|
|
|
|
|
IF(WIN32)
|
|
|
SET(WIN32_STYLE_FIND 1)
|
|
|
@@ -80,14 +74,14 @@ ENDIF(UNIX)
|
|
|
|
|
|
IF(WIN32_STYLE_FIND)
|
|
|
|
|
|
- ## ######################################################################
|
|
|
- ##
|
|
|
- ## Windows specific:
|
|
|
- ##
|
|
|
- ## candidates for root/base directory of wxwindows
|
|
|
- ## should have subdirs include and lib containing include/wx/wx.h
|
|
|
- ## fix the root dir to avoid mixing of headers/libs from different
|
|
|
- ## versions/builds:
|
|
|
+ # ###################################
|
|
|
+ #
|
|
|
+ # Windows specific:
|
|
|
+ #
|
|
|
+ # candidates for root/base directory of wxwindows
|
|
|
+ # should have subdirs include and lib containing include/wx/wx.h
|
|
|
+ # fix the root dir to avoid mixing of headers/libs from different
|
|
|
+ # versions/builds:
|
|
|
|
|
|
SET (WXWINDOWS_POSSIBLE_ROOT_PATHS
|
|
|
$ENV{WXWIN}
|
|
|
@@ -96,9 +90,9 @@ IF(WIN32_STYLE_FIND)
|
|
|
FIND_PATH(WXWINDOWS_ROOT_DIR include/wx/wx.h
|
|
|
${WXWINDOWS_POSSIBLE_ROOT_PATHS} )
|
|
|
|
|
|
- ## MESSAGE("DBG found WXWINDOWS_ROOT_DIR: ${WXWINDOWS_ROOT_DIR}")
|
|
|
+ # MESSAGE("DBG found WXWINDOWS_ROOT_DIR: ${WXWINDOWS_ROOT_DIR}")
|
|
|
|
|
|
- ## find libs for combination of static/shared with release/debug
|
|
|
+ # find libs for combination of static/shared with release/debug
|
|
|
SET (WXWINDOWS_POSSIBLE_LIB_PATHS
|
|
|
"${WXWINDOWS_ROOT_DIR}/lib" )
|
|
|
|
|
|
@@ -123,22 +117,22 @@ IF(WIN32_STYLE_FIND)
|
|
|
DOC "wxWindows shared debug build library " )
|
|
|
|
|
|
|
|
|
- ## if there is at least one shared lib available
|
|
|
- ## let user choose wether to use shared or static wxwindows libs
|
|
|
+ # if there is at least one shared lib available
|
|
|
+ # let user choose wether to use shared or static wxwindows libs
|
|
|
IF(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY)
|
|
|
- ## default value OFF because wxWindows MSVS default build is static
|
|
|
+ # default value OFF because wxWindows MSVS default build is static
|
|
|
OPTION(WXWINDOWS_USE_SHARED_LIBS
|
|
|
"Use shared versions (dll) of wxWindows libraries?" OFF)
|
|
|
MARK_AS_ADVANCED(WXWINDOWS_USE_SHARED_LIBS)
|
|
|
ENDIF(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY)
|
|
|
|
|
|
|
|
|
- ## add system libraries wxwindows depends on
|
|
|
+ # add system libraries wxwindows depends on
|
|
|
SET(CMAKE_WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
|
|
|
comctl32
|
|
|
rpcrt4
|
|
|
wsock32
|
|
|
- ## presumably ctl3d32 is not neccesary (Jan Woetzel 07/2003)
|
|
|
+ # presumably ctl3d32 is not neccesary (Jan Woetzel 07/2003)
|
|
|
# ctl3d32
|
|
|
# debug ${WXWINDOWS_ROOT_DIR}/lib/zlibd.lib optimized ${WXWINDOWS_ROOT_DIR}/lib/zlibd.lib
|
|
|
# debug ${WXWINDOWS_ROOT_DIR}/lib/regexd.lib optimized ${WXWINDOWS_ROOT_DIR}/lib/regexd.lib
|
|
|
@@ -151,7 +145,7 @@ IF(WIN32_STYLE_FIND)
|
|
|
# OPTION(WXWINDOWS_USE_GL "use wxWindows with GL support (use additional
|
|
|
# opengl, glu libs)?" OFF)
|
|
|
|
|
|
- ## opengl/glu: (TODO/FIXME: better use FindOpenGL.cmake here
|
|
|
+ # opengl/glu: (TODO/FIXME: better use FindOpenGL.cmake here
|
|
|
IF (WXWINDOWS_USE_GL)
|
|
|
SET(CMAKE_WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
|
|
|
opengl32
|
|
|
@@ -160,21 +154,21 @@ IF(WIN32_STYLE_FIND)
|
|
|
ENDIF (WXWINDOWS_USE_GL)
|
|
|
|
|
|
|
|
|
- ##
|
|
|
- ## select between use of shared or static wxWindows lib then set libs to use
|
|
|
- ## for debug and optimized build. so the user can switch between debug and
|
|
|
- ## release build e.g. within MS Visual Studio without running cmake with a
|
|
|
- ## different build directory again.
|
|
|
- ##
|
|
|
- ## then add the build specific include dir for wx/setup.h
|
|
|
- ##
|
|
|
+ #
|
|
|
+ # select between use of shared or static wxWindows lib then set libs to use
|
|
|
+ # for debug and optimized build. so the user can switch between debug and
|
|
|
+ # release build e.g. within MS Visual Studio without running cmake with a
|
|
|
+ # different build directory again.
|
|
|
+ #
|
|
|
+ # then add the build specific include dir for wx/setup.h
|
|
|
+ #
|
|
|
|
|
|
IF(WXWINDOWS_USE_SHARED_LIBS)
|
|
|
- ##MESSAGE("DBG wxWindows use shared lib selected.")
|
|
|
+ #MESSAGE("DBG wxWindows use shared lib selected.")
|
|
|
|
|
|
- ## shared: both wx (debug and release) found?
|
|
|
+ # shared: both wx (debug and release) found?
|
|
|
IF(WXWINDOWS_SHARED_DEBUG_LIBRARY AND WXWINDOWS_SHARED_LIBRARY)
|
|
|
- ##MESSAGE("DBG wx shared: debug and optimized found.")
|
|
|
+ #MESSAGE("DBG wx shared: debug and optimized found.")
|
|
|
SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
|
|
|
debug ${WXWINDOWS_SHARED_DEBUG_LIBRARY}
|
|
|
optimized ${WXWINDOWS_SHARED_LIBRARY} )
|
|
|
@@ -183,10 +177,10 @@ IF(WIN32_STYLE_FIND)
|
|
|
${WXWINDOWS_ROOT_DIR}/lib/mswdll )
|
|
|
ENDIF(WXWINDOWS_SHARED_DEBUG_LIBRARY AND WXWINDOWS_SHARED_LIBRARY)
|
|
|
|
|
|
- ## shared: only debug wx lib found?
|
|
|
+ # shared: only debug wx lib found?
|
|
|
IF(WXWINDOWS_SHARED_DEBUG_LIBRARY)
|
|
|
IF(NOT WXWINDOWS_SHARED_LIBRARY)
|
|
|
- ##MESSAGE("DBG wx shared: debug (but no optimized) found.")
|
|
|
+ #MESSAGE("DBG wx shared: debug (but no optimized) found.")
|
|
|
SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
|
|
|
${WXWINDOWS_SHARED_DEBUG_LIBRARY} )
|
|
|
FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
|
|
|
@@ -194,10 +188,10 @@ IF(WIN32_STYLE_FIND)
|
|
|
ENDIF(NOT WXWINDOWS_SHARED_LIBRARY)
|
|
|
ENDIF(WXWINDOWS_SHARED_DEBUG_LIBRARY)
|
|
|
|
|
|
- ## shared: only release wx lib found?
|
|
|
+ # shared: only release wx lib found?
|
|
|
IF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
|
|
|
IF(WXWINDOWS_SHARED_LIBRARY)
|
|
|
- ##MESSAGE("DBG wx shared: optimized (but no debug) found.")
|
|
|
+ #MESSAGE("DBG wx shared: optimized (but no debug) found.")
|
|
|
SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
|
|
|
${WXWINDOWS_SHARED_DEBUG_LIBRARY} )
|
|
|
FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
|
|
|
@@ -205,7 +199,7 @@ IF(WIN32_STYLE_FIND)
|
|
|
ENDIF(WXWINDOWS_SHARED_LIBRARY)
|
|
|
ENDIF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
|
|
|
|
|
|
- ## shared: none found?
|
|
|
+ # shared: none found?
|
|
|
IF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY)
|
|
|
IF(NOT WXWINDOWS_SHARED_LIBRARY)
|
|
|
MESSAGE(SEND_ERROR
|
|
|
@@ -215,11 +209,11 @@ IF(WIN32_STYLE_FIND)
|
|
|
|
|
|
|
|
|
ELSE(WXWINDOWS_USE_SHARED_LIBS)
|
|
|
- ##MESSAGE("DBG wxWindows static lib selected.")
|
|
|
+ #MESSAGE("DBG wxWindows static lib selected.")
|
|
|
|
|
|
- ## static: both wx (debug and release) found?
|
|
|
+ # static: both wx (debug and release) found?
|
|
|
IF(WXWINDOWS_STATIC_DEBUG_LIBRARY AND WXWINDOWS_STATIC_LIBRARY)
|
|
|
- ##MESSAGE("DBG wx static: debug and optimized found.")
|
|
|
+ #MESSAGE("DBG wx static: debug and optimized found.")
|
|
|
SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
|
|
|
debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY}
|
|
|
optimized ${WXWINDOWS_STATIC_LIBRARY} )
|
|
|
@@ -228,10 +222,10 @@ IF(WIN32_STYLE_FIND)
|
|
|
${WXWINDOWS_ROOT_DIR}/lib/msw )
|
|
|
ENDIF(WXWINDOWS_STATIC_DEBUG_LIBRARY AND WXWINDOWS_STATIC_LIBRARY)
|
|
|
|
|
|
- ## static: only debug wx lib found?
|
|
|
+ # static: only debug wx lib found?
|
|
|
IF(WXWINDOWS_STATIC_DEBUG_LIBRARY)
|
|
|
IF(NOT WXWINDOWS_STATIC_LIBRARY)
|
|
|
- ##MESSAGE("DBG wx static: debug (but no optimized) found.")
|
|
|
+ #MESSAGE("DBG wx static: debug (but no optimized) found.")
|
|
|
SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
|
|
|
${WXWINDOWS_STATIC_DEBUG_LIBRARY} )
|
|
|
FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
|
|
|
@@ -239,10 +233,10 @@ IF(WIN32_STYLE_FIND)
|
|
|
ENDIF(NOT WXWINDOWS_STATIC_LIBRARY)
|
|
|
ENDIF(WXWINDOWS_STATIC_DEBUG_LIBRARY)
|
|
|
|
|
|
- ## static: only release wx lib found?
|
|
|
+ # static: only release wx lib found?
|
|
|
IF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY)
|
|
|
IF(WXWINDOWS_STATIC_LIBRARY)
|
|
|
- ##MESSAGE("DBG wx static: optimized (but no debug) found.")
|
|
|
+ #MESSAGE("DBG wx static: optimized (but no debug) found.")
|
|
|
SET(WXWINDOWS_LIBRARIES ${CMAKE_WXWINDOWS_LIBRARIES}
|
|
|
${WXWINDOWS_STATIC_DEBUG_LIBRARY} )
|
|
|
FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h
|
|
|
@@ -250,7 +244,7 @@ IF(WIN32_STYLE_FIND)
|
|
|
ENDIF(WXWINDOWS_STATIC_LIBRARY)
|
|
|
ENDIF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY)
|
|
|
|
|
|
- ## static: none found?
|
|
|
+ # static: none found?
|
|
|
IF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY)
|
|
|
IF(NOT WXWINDOWS_STATIC_LIBRARY)
|
|
|
MESSAGE(SEND_ERROR
|
|
|
@@ -261,9 +255,9 @@ IF(WIN32_STYLE_FIND)
|
|
|
ENDIF(WXWINDOWS_USE_SHARED_LIBS)
|
|
|
|
|
|
|
|
|
- ## not neccessary in wxWindows 2.4.1
|
|
|
- ## but it may fix a previous bug, see
|
|
|
- ## http://lists.wxwindows.org/cgi-bin/ezmlm-cgi?8:mss:37574:200305:mpdioeneabobmgjenoap
|
|
|
+ # not neccessary in wxWindows 2.4.1
|
|
|
+ # but it may fix a previous bug, see
|
|
|
+ # http://lists.wxwindows.org/cgi-bin/ezmlm-cgi?8:mss:37574:200305:mpdioeneabobmgjenoap
|
|
|
OPTION(WXWINDOWS_SET_DEFINITIONS "Set additional defines for wxWindows" OFF)
|
|
|
MARK_AS_ADVANCED(WXWINDOWS_SET_DEFINITIONS)
|
|
|
IF (WXWINDOWS_SET_DEFINITIONS)
|
|
|
@@ -274,9 +268,9 @@ IF(WIN32_STYLE_FIND)
|
|
|
ENDIF (WXWINDOWS_SET_DEFINITIONS)
|
|
|
|
|
|
|
|
|
- ## Find the include directories for wxwindows
|
|
|
- ## the first, build specific for wx/setup.h was determined before.
|
|
|
- ## add inc dir for general for "wx/wx.h"
|
|
|
+ # Find the include directories for wxwindows
|
|
|
+ # the first, build specific for wx/setup.h was determined before.
|
|
|
+ # add inc dir for general for "wx/wx.h"
|
|
|
SET (WXWINDOWS_POSSIBLE_INCLUDE_PATHS
|
|
|
"${WXWINDOWS_ROOT_DIR}/include"
|
|
|
)
|
|
|
@@ -301,13 +295,13 @@ IF(WIN32_STYLE_FIND)
|
|
|
|
|
|
ELSE(WIN32_STYLE_FIND)
|
|
|
IF (UNIX_STYLE_FIND)
|
|
|
- ## ######################################################################
|
|
|
- ##
|
|
|
- ## UNIX/Linux specific:
|
|
|
- ##
|
|
|
- ## use backquoted wx-config to query and set flags and libs:
|
|
|
- ## 06/2003 Jan Woetzel
|
|
|
- ##
|
|
|
+ # ###################################
|
|
|
+ #
|
|
|
+ # UNIX/Linux specific:
|
|
|
+ #
|
|
|
+ # use backquoted wx-config to query and set flags and libs:
|
|
|
+ # 06/2003 Jan Woetzel
|
|
|
+ #
|
|
|
|
|
|
OPTION(WXWINDOWS_USE_SHARED_LIBS "Use shared versions (.so) of wxWindows libraries" ON)
|
|
|
MARK_AS_ADVANCED(WXWINDOWS_USE_SHARED_LIBS)
|
|
|
@@ -339,17 +333,17 @@ ELSE(WIN32_STYLE_FIND)
|
|
|
IF(WXWINDOWS_USE_GL)
|
|
|
SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS_LIBS} --gl-libs" )
|
|
|
ENDIF(WXWINDOWS_USE_GL)
|
|
|
- ##MESSAGE("DBG: WX_CONFIG_ARGS_LIBS=${WX_CONFIG_ARGS_LIBS}===")
|
|
|
+ #MESSAGE("DBG: WX_CONFIG_ARGS_LIBS=${WX_CONFIG_ARGS_LIBS}===")
|
|
|
|
|
|
# set CXXFLAGS to be fed into CMAKE_CXX_FLAGS by the user:
|
|
|
SET(CMAKE_WXWINDOWS_CXX_FLAGS "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} --cxxflags`")
|
|
|
- ##MESSAGE("DBG: for compilation:
|
|
|
- ##CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS}===")
|
|
|
+ #MESSAGE("DBG: for compilation:
|
|
|
+ #CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS}===")
|
|
|
|
|
|
# keep the back-quoted string for clarity
|
|
|
SET(WXWINDOWS_LIBRARIES "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} ${WX_CONFIG_ARGS_LIBS}`")
|
|
|
- ##MESSAGE("DBG2: for linking:
|
|
|
- ##WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES}===")
|
|
|
+ #MESSAGE("DBG2: for linking:
|
|
|
+ #WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES}===")
|
|
|
|
|
|
# evaluate wx-config output to separate linker flags and linkdirs for
|
|
|
# rpath:
|
|
|
@@ -357,23 +351,23 @@ ELSE(WIN32_STYLE_FIND)
|
|
|
ARGS ${WX_CONFIG_ARGS_LIBS}
|
|
|
OUTPUT_VARIABLE WX_CONFIG_LIBS )
|
|
|
|
|
|
- ## extract linkdirs (-L) for rpath
|
|
|
- ## use regular expression to match wildcard equivalent "-L*<endchar>"
|
|
|
- ## with <endchar> is a space or a semicolon
|
|
|
+ # extract linkdirs (-L) for rpath
|
|
|
+ # use regular expression to match wildcard equivalent "-L*<endchar>"
|
|
|
+ # with <endchar> is a space or a semicolon
|
|
|
STRING(REGEX MATCHALL "[-][L]([^ ;])+" WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX "${WX_CONFIG_LIBS}" )
|
|
|
#MESSAGE("DBG WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX=${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX}")
|
|
|
|
|
|
- ## remove prefix -L because we need the pure directory for LINK_DIRECTORIES
|
|
|
- ## replace -L by ; because the separator seems to be lost otherwise (bug or
|
|
|
- ## feature?)
|
|
|
+ # remove prefix -L because we need the pure directory for LINK_DIRECTORIES
|
|
|
+ # replace -L by ; because the separator seems to be lost otherwise (bug or
|
|
|
+ # feature?)
|
|
|
IF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX)
|
|
|
STRING(REGEX REPLACE "[-][L]" ";" WXWINDOWS_LINK_DIRECTORIES ${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX} )
|
|
|
#MESSAGE("DBG WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES}")
|
|
|
ENDIF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX)
|
|
|
|
|
|
|
|
|
- ## replace space separated string by semicolon separated vector to make it
|
|
|
- ## work with LINK_DIRECTORIES
|
|
|
+ # replace space separated string by semicolon separated vector to make it
|
|
|
+ # work with LINK_DIRECTORIES
|
|
|
SEPARATE_ARGUMENTS(WXWINDOWS_LINK_DIRECTORIES)
|
|
|
|
|
|
MARK_AS_ADVANCED(
|
|
|
@@ -401,10 +395,10 @@ ENDIF(WIN32_STYLE_FIND)
|
|
|
IF(WXWINDOWS_LIBRARIES)
|
|
|
IF(WXWINDOWS_INCLUDE_DIR OR CMAKE_WXWINDOWS_CXX_FLAGS)
|
|
|
|
|
|
- ## found all we need.
|
|
|
+ # found all we need.
|
|
|
SET(WXWINDOWS_FOUND 1)
|
|
|
|
|
|
- ## set deprecated variables for backward compatibility:
|
|
|
+ # set deprecated variables for backward compatibility:
|
|
|
SET(CMAKE_WX_CAN_COMPILE ${WXWINDOWS_FOUND})
|
|
|
SET(WXWINDOWS_LIBRARY ${WXWINDOWS_LIBRARIES})
|
|
|
SET(WXWINDOWS_INCLUDE_PATH ${WXWINDOWS_INCLUDE_DIR})
|