CMake: remove OpenSSL download and build dependency code.
* Removed some left over OSX_DEP_BUILDER code missed in my previous commit.
This commit is contained in:
parent
c99f6722df
commit
b04f18b245
|
@ -54,14 +54,6 @@ option( KICAD_SCRIPTING_WXPYTHON
|
||||||
"Build wxPython implementation for wx interface building in Python and py.shell (default OFF)."
|
"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,
|
# 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
|
# as it is known to work with KiCad. Other versions may contain bugs that may result
|
||||||
# in KiCad errors.
|
# in KiCad errors.
|
||||||
|
|
|
@ -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 <dick@softplc.com>
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
#-----<configure>-------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
set( OPENSSL_RELEASE "1.0.1e" )
|
|
||||||
set( OPENSSL_MD5 08bec482fe1c4795e819bfcfcb9647b9 ) # re-calc on every RELEASE change
|
|
||||||
|
|
||||||
#-----</configure>-----------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
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=<INSTALL_DIR>
|
|
||||||
-DBUILD_SHARED_LIBS=ON
|
|
||||||
${TOOLCHAIN}
|
|
||||||
<SOURCE_DIR>
|
|
||||||
|
|
||||||
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 <SOURCE_DIR>
|
|
||||||
COMMENT "committing pristine ${target} files to '${target} scratch repo'"
|
|
||||||
DEPENDERS patch
|
|
||||||
)
|
|
||||||
|
|
||||||
ExternalProject_Add_Step( ${target} bzr_add_${target}
|
|
||||||
COMMAND bzr add -q <SOURCE_DIR>
|
|
||||||
COMMENT "adding pristine ${target} files to '${target} scratch repo'"
|
|
||||||
DEPENDERS bzr_commit_${target}
|
|
||||||
)
|
|
||||||
|
|
||||||
ExternalProject_Add_Step( ${target} bzr_init_${target}
|
|
||||||
COMMAND bzr init -q <SOURCE_DIR>
|
|
||||||
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 )
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# This program source code file is part of KICAD, a free EDA CAD application.
|
# This program source code file is part of KICAD, a free EDA CAD application.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||||
# 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
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
|
@ -26,19 +26,13 @@
|
||||||
#################################################
|
#################################################
|
||||||
include( download_avhttp )
|
include( download_avhttp )
|
||||||
|
|
||||||
if( MINGW AND NOT OPENSSL_ROOT_DIR )
|
find_package( OpenSSL REQUIRED )
|
||||||
# download, compile and install to scratch dir a recent OPENSSL library and headers
|
#message( STATUS "OPENSSL_FOUND:${OPENSSL_FOUND} OPENSSL_LIBRARIES:${OPENSSL_LIBRARIES}" )
|
||||||
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()
|
|
||||||
|
|
||||||
|
# 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:
|
# These are additions to any inherited from pcbnew dir:
|
||||||
include_directories( . ${OPENSSL_INCLUDE_DIR} ${AVHTTP_INCLUDE_DIR} )
|
include_directories( . ${OPENSSL_INCLUDE_DIR} ${AVHTTP_INCLUDE_DIR} )
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
if( KICAD_SCRIPTING_MODULES )
|
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
|
add_custom_target( qa
|
||||||
COMMAND PYTHONPATH=${CMAKE_BINARY_DIR}/pcbnew${PYTHON_QA_PATH} ${PYTHON_EXECUTABLE} test.py
|
COMMAND PYTHONPATH=${CMAKE_BINARY_DIR}/pcbnew${PYTHON_QA_PATH} ${PYTHON_EXECUTABLE} test.py
|
||||||
|
|
Loading…
Reference in New Issue