summaryrefslogtreecommitdiff
path: root/Modules/UsewxWidgets.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/UsewxWidgets.cmake')
-rw-r--r--Modules/UsewxWidgets.cmake59
1 files changed, 35 insertions, 24 deletions
diff --git a/Modules/UsewxWidgets.cmake b/Modules/UsewxWidgets.cmake
index bb8c29b3e..a50d03d53 100644
--- a/Modules/UsewxWidgets.cmake
+++ b/Modules/UsewxWidgets.cmake
@@ -1,33 +1,41 @@
-# - Convenience include for using wxWidgets library.
-# Determines if wxWidgets was FOUND and sets the appropriate libs, incdirs,
-# flags, etc. INCLUDE_DIRECTORIES and LINK_DIRECTORIES are called.
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#.rst:
+# UsewxWidgets
+# ------------
+#
+# Convenience include for using wxWidgets library.
+#
+# Determines if wxWidgets was FOUND and sets the appropriate libs,
+# incdirs, flags, etc. INCLUDE_DIRECTORIES and LINK_DIRECTORIES are
+# called.
#
# USAGE
-# # Note that for MinGW users the order of libs is important!
-# find_package(wxWidgets REQUIRED net gl core base)
-# include(${wxWidgets_USE_FILE})
-# # and for each of your dependent executable/library targets:
-# target_link_libraries(<YourTarget> ${wxWidgets_LIBRARIES})
+#
+# ::
+#
+# # Note that for MinGW users the order of libs is important!
+# find_package(wxWidgets REQUIRED net gl core base)
+# include(${wxWidgets_USE_FILE})
+# # and for each of your dependent executable/library targets:
+# target_link_libraries(<YourTarget> ${wxWidgets_LIBRARIES})
+#
+#
#
# 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.
+#
+#
#
# AUTHOR
-# 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.)
+# Jan Woetzel <jw -at- mip.informatik.uni-kiel.de>
# debug message and logging.
# comment these out for distribution
@@ -69,8 +77,11 @@ if (wxWidgets_FOUND)
endif()
if (wxWidgets_CXX_FLAGS)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}")
- MSG("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
+ # Flags are expected to be a string here, not a list.
+ string(REPLACE ";" " " wxWidgets_CXX_FLAGS_str "${wxWidgets_CXX_FLAGS}")
+ string(APPEND CMAKE_CXX_FLAGS " ${wxWidgets_CXX_FLAGS_str}")
+ MSG("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS_str}")
+ unset(wxWidgets_CXX_FLAGS_str)
endif()
# DEPRECATED JW