macOS build: build cmake & cmark

This commit is contained in:
Moritz Bunkus 2018-01-15 19:32:33 +01:00
parent 43b0ec1b20
commit 9586d394ef
3 changed files with 72 additions and 0 deletions

View File

@ -71,6 +71,10 @@ function build_pkgconfig {
--enable-static --enable-shared=no
}
function build_cmake {
build_package cmake-3.10.0.tar.gz --prefix=${TARGET}
}
function build_ogg {
build_package libogg-1.3.2.tar.gz --prefix=${TARGET} \
--disable-shared --enable-static
@ -122,6 +126,26 @@ function build_boost {
build_tarball command "./b2 ${args} ${properties} install"
}
function build_cmark {
NO_CONFIGURE=1 build_package cmark-0.28.3.tar.gz
for PATCH in ${SCRIPT_PATH}/cmark-patches/*.patch; do
patch -p1 < ${PATCH}
done
mkdir build
cd build
$DEBUG cmake .. \
-DCMAKE_INSTALL_PREFIX=${TARGET} \
-DCMARK_TESTS=OFF \
-DCMARK_STATIC=ON \
-DCMARK_SHARED=OFF
$DEBUG make
build_tarball command "make DESTDIR=TMPDIR install"
}
function build_qtbase {
local -a args
args=(--prefix=${TARGET} -opensource -confirm-license -release
@ -451,11 +475,13 @@ if [[ -z $@ ]]; then
build_autoconf
build_automake
build_pkgconfig
build_cmake
build_ogg
build_vorbis
build_flac
build_zlib
build_gettext
build_cmark
build_boost
build_qt
build_ruby

View File

@ -0,0 +1,22 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Moritz Bunkus <moritz@bunkus.org>
Date: Mon, 1 Jan 2018 16:17:41 +0100
Subject: [PATCH 1/1] do not build and install man pages
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,7 +30,6 @@ add_subdirectory(src)
if(CMARK_TESTS AND CMARK_SHARED)
add_subdirectory(api_test)
endif()
-add_subdirectory(man)
if(CMARK_TESTS)
enable_testing()
add_subdirectory(test testdir)

View File

@ -0,0 +1,24 @@
commit 9ead98df8ae2a64842dd157485b69756b5a32a2c
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Tue Nov 14 14:42:06 2017 +0100
Generate export header for static-only build
Fixes issue #247.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d5a1936..995a9df 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -115,6 +115,11 @@ if (CMARK_STATIC)
VERSION ${PROJECT_VERSION})
endif(MSVC)
+ if (NOT CMARK_SHARED)
+ generate_export_header(${STATICLIBRARY}
+ BASE_NAME ${PROJECT_NAME})
+ endif()
+
list(APPEND CMARK_INSTALL ${STATICLIBRARY})
endif()