|
From: <ai...@us...> - 2013-06-13 02:53:15
|
Revision: 12382
http://sourceforge.net/p/plplot/code/12382
Author: airwin
Date: 2013-06-13 02:53:11 +0000 (Thu, 13 Jun 2013)
Log Message:
-----------
Add wxwidgets build configuration.
Tested by: Alan W. Irwin <ai...@us...> using the
build_wxwidgets target for the "Ninja" CMake generator both for
Linux and Wine (git version near 1.6_rc1).
Modified Paths:
--------------
trunk/cmake/build_projects/CMakeLists.txt
Added Paths:
-----------
trunk/cmake/build_projects/wxwidgets/
trunk/cmake/build_projects/wxwidgets/bp.cmake
Modified: trunk/cmake/build_projects/CMakeLists.txt
===================================================================
--- trunk/cmake/build_projects/CMakeLists.txt 2013-06-12 20:55:04 UTC (rev 12381)
+++ trunk/cmake/build_projects/CMakeLists.txt 2013-06-13 02:53:11 UTC (rev 12382)
@@ -81,6 +81,7 @@
# individual project configurations will not work unless this is
# available so might as well check it here.
bash
+ make
)
foreach(executable ${executables_LIST})
@@ -118,10 +119,14 @@
endfunction(determine_msys_path)
endif(MSYS_PLATFORM)
-# This works for at least Linux make, ninja, MinGW mingw32_make, MSYS make,
-# and jom.
+# This gives the full pathname of the associated build tool for at
+# least the "Unix Makefiles", "Ninja", "MSYS Makefiles", "MinGW
+# Makefiles", and "NMake Makefiles JOM" CMake generators.
set(BP_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}")
+# Actual make programme used for autotools builds.
+set(BP_MAKE_COMMAND ${MAKE_EXECUTABLE})
+
set(BP_CTEST_COMMAND "${CMAKE_CTEST_COMMAND}")
if(MSYS_PLATFORM)
@@ -130,31 +135,39 @@
# scripts) requires all full paths be in the MSYS platform form.
determine_msys_path(BP_CMAKE_COMMAND "${BP_CMAKE_COMMAND}")
determine_msys_path(BP_BUILD_COMMAND "${BP_BUILD_COMMAND}")
+ determine_msys_path(BP_MAKE_COMMAND "${BP_MAKE_COMMAND}")
determine_msys_path(BP_CTEST_COMMAND "${BP_CTEST_COMMAND}")
determine_msys_path(MSYS_CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
determine_msys_path(MSYS_CMAKE_COMMAND "${CMAKE_COMMAND}")
# Propagate the overall CMake generator and install prefix to all CMake-based
# software project builds.
set(BP_CMAKE_COMMAND ${MSYS_CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX:PATH=${MSYS_CMAKE_INSTALL_PREFIX})
+ # Propagate the install prefix to autotools-based builds
+ set(BP_CONFIGURE_COMMAND configure --prefix=${MSYS_CMAKE_INSTALL_PREFIX})
else(MSYS_PLATFORM)
# Propagate the overall CMake generator and install prefix to all CMake-based
# software project builds.
set(BP_CMAKE_COMMAND ${CMAKE_COMMAND} "-G${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX})
+ # Propagate the install prefix to autotools-based builds
+ set(BP_CONFIGURE_COMMAND configure --prefix=${CMAKE_INSTALL_PREFIX})
endif(MSYS_PLATFORM)
-
# The parallel versions are for software packages that
# do not have race conditions for parallel builds or tests.
set(BP_PARALLEL_BUILD_COMMAND "${BP_BUILD_COMMAND}" -j4)
set(BP_PARALLEL_CTEST_COMMAND "${BP_CTEST_COMMAND}" -j4)
+# For autotools based builds.
+set(BP_PARALLEL_MAKE_COMMAND "${BP_MAKE_COMMAND}" -j4)
message(STATUS "BP_CMAKE_COMMAND = ${BP_CMAKE_COMMAND}")
+message(STATUS "BP_CONFIGURE_COMMAND = ${BP_CONFIGURE_COMMAND}")
message(STATUS "BP_BUILD_COMMAND = ${BP_BUILD_COMMAND}")
message(STATUS "BP_PARALLEL_BUILD_COMMAND = ${BP_PARALLEL_BUILD_COMMAND}")
+message(STATUS "BP_MAKE_COMMAND = ${BP_MAKE_COMMAND}")
+message(STATUS "BP_PARALLEL_MAKE_COMMAND = ${BP_PARALLEL_MAKE_COMMAND}")
message(STATUS "BP_CTEST_COMMAND = ${BP_CTEST_COMMAND}")
message(STATUS "BP_PARALLEL_CTEST_COMMAND = ${BP_PARALLEL_CTEST_COMMAND}")
-
set(BP_ORIGINAL_NATIVE_PATH "$ENV{PATH}")
set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
@@ -172,8 +185,8 @@
# developers.
include(ndiff/bp.cmake)
-# Configure wxwidgets, a soft (optional) PLplot dependency
-#include(wxwidgets/bp.cmake)
+# Configure a build of wxwidgets, a soft (optional) PLplot dependency
+include(wxwidgets/bp.cmake)
# Configure a build of PLplot and its dependencies.
include(plplot/bp.cmake)
Added: trunk/cmake/build_projects/wxwidgets/bp.cmake
===================================================================
--- trunk/cmake/build_projects/wxwidgets/bp.cmake (rev 0)
+++ trunk/cmake/build_projects/wxwidgets/bp.cmake 2013-06-13 02:53:11 UTC (rev 12382)
@@ -0,0 +1,62 @@
+# wxwidgets/bp.cmake
+# This file should be included directly or indirectly from a top-level
+# CMakeLists.txt file to configure the build of wxwidgets.
+
+# Copyright (C) 2013 Alan W. Irwin
+
+# This file is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# The top-level CMakeLists.txt file that includes this file should
+# have run "include(ExternalProject)" and set EP_BASE variable (and
+# corresponding directory property) as well as various BP variables
+# used below that configure how the External_Project functions
+# operate.
+
+set(BP_PACKAGE wxwidgets)
+
+# Data that is related to downloads.
+set(${BP_PACKAGE}_URL http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.12.tar.gz)
+set(${BP_PACKAGE}_URL_MD5 2fa39da14bc06ea86fe902579fedc5b1)
+
+# Data that is related to the PATH that must be used.
+if(MSYS_PLATFORM)
+ #set(BP_PATH_NODLL "${BP_PATH}")
+ #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}")
+ determine_msys_path(BP_PATH "${BP_PATH}")
+ # Must have all elements of env command in MSYS platform form
+ determine_msys_path(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
+else(MSYS_PLATFORM)
+ set(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}")
+endif(MSYS_PLATFORM)
+#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}")
+
+# The fno-keep-inline-dllexport flag required to work around
+# the memory exhaustion issue discussed in
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43601
+# Still have memory exhaustion issues if you combine that
+# with -O3 so do not use the -O3 optimization flag.
+ExternalProject_Add(
+ build_${BP_PACKAGE}
+ URL ${${BP_PACKAGE}_URL}
+ URL_MD5 ${${BP_PACKAGE}_URL_MD5}
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} CXXFLAGS=-fno-keep-inline-dllexport ${source_PATH}/${BP_CONFIGURE_COMMAND} --enable-shared --enable-unicode --enable-debug --enable-debug_gdb
+ BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND}
+ INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} install
+ )
+
+list(APPEND build_target_LIST build_${BP_PACKAGE})
+# Restore BP_PATH to original state.
+set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}")
+#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|