From b04f18b2456d4a1c75554e89b22918c971d7a7e5 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Thu, 3 Dec 2015 10:59:02 -0500 Subject: [PATCH] CMake: remove OpenSSL download and build dependency code. * Removed some left over OSX_DEP_BUILDER code missed in my previous commit. --- CMakeLists.txt | 8 -- CMakeModules/download_openssl.cmake | 127 ---------------------------- pcbnew/github/CMakeLists.txt | 20 ++--- qa/CMakeLists.txt | 6 +- 4 files changed, 8 insertions(+), 153 deletions(-) delete mode 100644 CMakeModules/download_openssl.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 708a6a4810..9ff922cae3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,14 +54,6 @@ option( KICAD_SCRIPTING_WXPYTHON "Build wxPython implementation for wx interface building in Python and py.shell (default OFF)." ) -option( KICAD_BUILD_STATIC - "Build dependencies as static libraries. OSX only. (default OFF)." - ) - -option( KICAD_BUILD_DYNAMIC - "Build dependencies as shared libraries. Required for wxPython support. OXS only. (default OFF)." - ) - # WARNING: KiCad developers strongly advise you to build Boost with supplied patches, # as it is known to work with KiCad. Other versions may contain bugs that may result # in KiCad errors. diff --git a/CMakeModules/download_openssl.cmake b/CMakeModules/download_openssl.cmake deleted file mode 100644 index 6ab8fc70d7..0000000000 --- a/CMakeModules/download_openssl.cmake +++ /dev/null @@ -1,127 +0,0 @@ -# This program source code file is part of KICAD, a free EDA CAD application. -# -# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck -# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, you may find one here: -# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html -# or you may search the http://www.gnu.org website for the version 2 license, -# or you may write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - - - -# Download OPENSSL and install into ${PREFIX}, typically in our KiCad source tree. -# Assumes include( ExternalProject ) was done inline previous to this file -# and that set( DOWNLOAD_DIR ... ) was set in a higher context. - -#------------------------------------------------------------------------------------------ - -set( OPENSSL_RELEASE "1.0.1e" ) -set( OPENSSL_MD5 08bec482fe1c4795e819bfcfcb9647b9 ) # re-calc on every RELEASE change - -#---------------------------------------------------------------------------------------- - -set( PREFIX ${DOWNLOAD_DIR}/openssl-${OPENSSL_RELEASE} ) - -# CMake barfs if we pass in an empty CMAKE_TOOLCHAIN_FILE, so we only set it up -# if it has a non-empty value -unset( TOOLCHAIN ) -if( CMAKE_TOOLCHAIN_FILE ) - set( TOOLCHAIN "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" ) -endif() - -FIND_PROGRAM (patch_bin NAMES patch.exe patch) - -if( "${patch_bin}" STREQUAL "patch_bin-NOTFOUND" ) - set( PATCH_STR_CMD bzr patch -p0 ) -else() - set( PATCH_STR_CMD ${patch_bin} -p0 -i ) -endif() - -ExternalProject_Add( - openssl - DOWNLOAD_DIR ${DOWNLOAD_DIR} - PREFIX ${PREFIX} - TIMEOUT 60 - URL http://launchpad.net/openssl-cmake/1.0.1e/1.0.1e-1/+download/openssl-cmake-1.0.1e-src.tar.gz - URL_MD5 ${OPENSSL_MD5} - - # mingw uses msvcrt.dll's printf() which cannot handle %zd, so having - # BIO_snprintf() reference printf()'s formating attributes is a bug, since - # BIO_snprintf() does its own formatting and is different from msvcrt's printf(). - - # This one would be easier if Windows folks could be asked to install "patch.exe" - # PATCH_COMMAND patch -p0 < ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch - - # This one requires the bzr commit below, since bzr patch only knows a working tree. - - # Revert the branch to pristine before applying patch sets as bzr patch - # fails when applying a patch to the branch twice and doesn't have a switch - # to ignore previously applied patches - PATCH_COMMAND bzr revert - # PATCH_COMMAND continuation (any *_COMMAND here can be continued with COMMAND): - COMMAND ${PATCH_STR_CMD} ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch - - CONFIGURE_COMMAND - ${CMAKE_COMMAND} - -G ${CMAKE_GENERATOR} - -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} - -DCMAKE_INSTALL_PREFIX= - -DBUILD_SHARED_LIBS=ON - ${TOOLCHAIN} - - - BUILD_IN_SOURCE 1 - BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} - INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install - ) - -# In order to use "bzr patch", we have to have a bzr working tree, this means a bzr repo -# must be created and source committed to it. These extra steps do that. - -set( target "openssl" ) - -ExternalProject_Add_Step( ${target} bzr_commit_${target} - COMMAND bzr ci -q -m pristine - COMMENT "committing pristine ${target} files to '${target} scratch repo'" - DEPENDERS patch - ) - -ExternalProject_Add_Step( ${target} bzr_add_${target} - COMMAND bzr add -q - COMMENT "adding pristine ${target} files to '${target} scratch repo'" - DEPENDERS bzr_commit_${target} - ) - -ExternalProject_Add_Step( ${target} bzr_init_${target} - COMMAND bzr init -q - COMMENT "creating '${target} scratch repo' specifically for tracking ${target} patches" - DEPENDERS bzr_add_${target} - DEPENDEES download - ) - -# The spelling of these is always taken from CMake Module's FindXYZ.cmake file: -set( OPENSSL_INCLUDE_DIR - ${PREFIX}/include - CACHE FILEPATH "OPENSSL include directory" - ) - -set( OPENSSL_LIBRARIES - ${PREFIX}/lib/libssl${CMAKE_IMPORT_LIBRARY_SUFFIX} - ${PREFIX}/lib/libcrypto${CMAKE_IMPORT_LIBRARY_SUFFIX} - CACHE STRING "OPENSSL libraries" - ) -set( OPENSSL_FOUND true ) - diff --git a/pcbnew/github/CMakeLists.txt b/pcbnew/github/CMakeLists.txt index d630c69a8d..c1a4ee1f0f 100644 --- a/pcbnew/github/CMakeLists.txt +++ b/pcbnew/github/CMakeLists.txt @@ -1,7 +1,7 @@ # This program source code file is part of KICAD, a free EDA CAD application. # # Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck -# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors. +# Copyright (C) 2013-2015 Kicad Developers, see AUTHORS.txt for contributors. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -26,19 +26,13 @@ ################################################# include( download_avhttp ) -if( MINGW AND NOT OPENSSL_ROOT_DIR ) - # download, compile and install to scratch dir a recent OPENSSL library and headers - include( download_openssl ) -else() - find_package( OpenSSL REQUIRED ) - #message( STATUS "OPENSSL_FOUND:${OPENSSL_FOUND} OPENSSL_LIBRARIES:${OPENSSL_LIBRARIES}" ) - - # FindOpenSSL.cmake does not set this var into cache, so is not globally visible, - # do it here incase some other link image needs these libraries - set( OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES}" CACHE FILEPATH "OpenSSL link libraries" ) - set( OPENSSL_INCLUDE_DIR "${OPENSSL_INCLUDE_DIR}" CACHE FILEPATH "OpenSSL include dir" ) -endif() +find_package( OpenSSL REQUIRED ) +#message( STATUS "OPENSSL_FOUND:${OPENSSL_FOUND} OPENSSL_LIBRARIES:${OPENSSL_LIBRARIES}" ) +# FindOpenSSL.cmake does not set this var into cache, so is not globally visible, +# do it here incase some other link image needs these libraries +set( OPENSSL_LIBRARIES "${OPENSSL_LIBRARIES}" CACHE FILEPATH "OpenSSL link libraries" ) +set( OPENSSL_INCLUDE_DIR "${OPENSSL_INCLUDE_DIR}" CACHE FILEPATH "OpenSSL include dir" ) # These are additions to any inherited from pcbnew dir: include_directories( . ${OPENSSL_INCLUDE_DIR} ${AVHTTP_INCLUDE_DIR} ) diff --git a/qa/CMakeLists.txt b/qa/CMakeLists.txt index 796575d288..bd579a5972 100644 --- a/qa/CMakeLists.txt +++ b/qa/CMakeLists.txt @@ -1,10 +1,6 @@ if( KICAD_SCRIPTING_MODULES ) - if( APPLE AND ( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) ) - set( PYTHON_QA_PATH :${LIBWXPYTHON_ROOT}/wxPython/lib/python2.6/site-packages ) - endif() - - # build target that runs the QA tests through scripting + # build target that runs the QA tests through scripting add_custom_target( qa COMMAND PYTHONPATH=${CMAKE_BINARY_DIR}/pcbnew${PYTHON_QA_PATH} ${PYTHON_EXECUTABLE} test.py