summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cgal-1-fixes.patch37
-rw-r--r--src/cgal-TryRunResults.cmake15
-rw-r--r--src/cgal.mk46
3 files changed, 66 insertions, 32 deletions
diff --git a/src/cgal-1-fixes.patch b/src/cgal-1-fixes.patch
new file mode 100644
index 0000000..dc8c3c2
--- /dev/null
+++ b/src/cgal-1-fixes.patch
@@ -0,0 +1,37 @@
+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: Tony Theodore <tonyt@logyst.com>
+Date: Wed, 26 Jul 2017 18:34:16 +1000
+Subject: [PATCH] link examples with boost libraries
+
+
+diff --git a/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake b/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake
+index 1111111..2222222 100644
+--- a/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake
++++ b/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake
+@@ -1,6 +1,8 @@
+ include(CGAL_add_test)
+ include(CMakeParseArguments)
+
++find_package(Boost COMPONENTS system thread REQUIRED)
++
+ function(create_single_source_cgal_program firstfile )
+ set(options NO_TESTING)
+ set(oneValueArgs)
+@@ -61,11 +63,11 @@ function(create_single_source_cgal_program firstfile )
+ # Link the executable to CGAL and third-party libraries
+ if ( CGAL_AUTO_LINK_ENABLED )
+
+- target_link_libraries(${exe_name} ${CGAL_3RD_PARTY_LIBRARIES} )
++ target_link_libraries(${exe_name} ${CGAL_3RD_PARTY_LIBRARIES} ${Boost_LIBRARIES} )
+
+ else()
+
+- target_link_libraries(${exe_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
++ target_link_libraries(${exe_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${Boost_LIBRARIES} )
+
+ endif()
+ else()
diff --git a/src/cgal-TryRunResults.cmake b/src/cgal-TryRunResults.cmake
index 9e3acf4..4066792 100644
--- a/src/cgal-TryRunResults.cmake
+++ b/src/cgal-TryRunResults.cmake
@@ -223,11 +223,20 @@ SET( OPENGL_RUN_RES__TRYRUN_OUTPUT
CACHE STRING "Output from TRY_RUN" FORCE)
-SET( QT4_RUN_RES
+SET( QT_RUN_RES
"0"
CACHE STRING "Result from TRY_RUN" FORCE)
-SET( QT4_RUN_RES__TRYRUN_OUTPUT
- "version=4.8.6"
+SET( QT_RUN_RES__TRYRUN_OUTPUT
+ "version=5.9.0"
+ CACHE STRING "Output from TRY_RUN" FORCE)
+
+
+SET( CGAL_test_cpp_version_RUN_RES
+ "0"
+ CACHE STRING "Result from TRY_RUN" FORCE)
+
+SET( CGAL_test_cpp_version_RUN_RES__TRYRUN_OUTPUT
+ "201103L"
CACHE STRING "Output from TRY_RUN" FORCE)
diff --git a/src/cgal.mk b/src/cgal.mk
index f9b6380..a1edf69 100644
--- a/src/cgal.mk
+++ b/src/cgal.mk
@@ -3,48 +3,36 @@
PKG := cgal
$(PKG)_WEBSITE := https://www.cgal.org/
$(PKG)_IGNORE :=
-$(PKG)_VERSION := 4.9.1
-$(PKG)_CHECKSUM := 56557da971b5310c2678ffc5def4109266666ff3adc7babbe446797ee2b90cca
+$(PKG)_VERSION := 4.10
+$(PKG)_CHECKSUM := eb56e17dcdecddf6a6fb808931b2142f20aaa182916ddbd912273c51e0f0c045
+# using / in tag name means we have to set SUBDIR, FILE, URL
+$(PKG)_GH_CONF := CGAL/cgal, releases/CGAL-
$(PKG)_SUBDIR := CGAL-$($(PKG)_VERSION)
$(PKG)_FILE := CGAL-$($(PKG)_VERSION).tar.xz
-$(PKG)_URL := https://github.com/CGAL/cgal/releases/download/releases%2F$($(PKG)_SUBDIR)/$($(PKG)_FILE)
+$(PKG)_URL := https://github.com/CGAL/cgal/releases/download/releases/$($(PKG)_SUBDIR)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc boost gmp mpfr qt5
-define $(PKG)_UPDATE
- $(WGET) -q -O- 'https://gforge.inria.fr/frs/?group_id=52' | \
- grep 'CGAL-' | \
- $(SED) -n 's,.*CGAL-\([0-9][^>a-z]*\)\.tar.*,\1,p' | \
- head -1
-endef
-
define $(PKG)_BUILD
- cd '$(1)' && '$(TARGET)-cmake' \
+ cd '$(BUILD_DIR)' && '$(TARGET)-cmake' '$(SOURCE_DIR)' \
-DCGAL_INSTALL_CMAKE_DIR:STRING="lib/CGAL" \
-DCGAL_INSTALL_INC_DIR:STRING="include" \
-DCGAL_INSTALL_DOC_DIR:STRING="share/doc/CGAL-$($(PKG)_VERSION)" \
-DCGAL_INSTALL_BIN_DIR:STRING="bin" \
-DCGAL_Boost_USE_STATIC_LIBS:BOOL=$(CMAKE_STATIC_BOOL) \
- -DWITH_CGAL_Qt3:BOOL=OFF \
-DWITH_OpenGL:BOOL=ON \
-DWITH_ZLIB:BOOL=ON \
- -C '$(PWD)/src/cgal-TryRunResults.cmake' .
+ -C'$(PWD)/src/cgal-TryRunResults.cmake'
- $(MAKE) -C '$(1)' -j $(JOBS)
- $(MAKE) -C '$(1)' -j 1 install
+ $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS)
+ $(MAKE) -C '$(BUILD_DIR)' -j 1 install
- cd '$(1)/examples/AABB_tree' && '$(TARGET)-cmake' \
- -DWITH_CGAL_Qt3:BOOL=OFF \
- -DCGAL_BUILD_SHARED_LIBS=$(CMAKE_SHARED_BOOL) \
- -DCGAL_Boost_USE_STATIC_LIBS:BOOL=$(CMAKE_STATIC_BOOL) \
- -DCGAL_DIR:STRING="../.." .
- $(MAKE) -C '$(1)/examples/AABB_tree' -j $(JOBS)
- $(INSTALL) '$(1)/examples/AABB_tree/AABB_polyhedron_edge_example.exe' '$(PREFIX)/$(TARGET)/bin/test-cgal.exe'
+ mkdir '$(BUILD_DIR).test-tree'
+ cd '$(BUILD_DIR).test-tree' && '$(TARGET)-cmake' '$(SOURCE_DIR)/examples/AABB_tree'
+ $(MAKE) -C '$(BUILD_DIR).test-tree' -j $(JOBS)
+ $(INSTALL) '$(BUILD_DIR).test-tree/AABB_polyhedron_edge_example.exe' '$(PREFIX)/$(TARGET)/bin/test-cgal.exe'
- cd '$(1)/examples/CGALimageIO' && '$(TARGET)-cmake' \
- -DWITH_CGAL_Qt3:BOOL=OFF \
- -DCGAL_BUILD_SHARED_LIBS=$(CMAKE_SHARED_BOOL) \
- -DCGAL_Boost_USE_STATIC_LIBS:BOOL=$(CMAKE_STATIC_BOOL) \
- -DCGAL_DIR:STRING="../.." .
- $(MAKE) -C '$(1)/examples/CGALimageIO' -j $(JOBS)
- $(INSTALL) '$(1)/examples/CGALimageIO/convert_raw_image_to_inr.exe' '$(PREFIX)/$(TARGET)/bin/test-cgalimgio.exe'
+ mkdir '$(BUILD_DIR).test-image'
+ cd '$(BUILD_DIR).test-image' && '$(TARGET)-cmake' '$(SOURCE_DIR)/examples/CGALimageIO'
+ $(MAKE) -C '$(BUILD_DIR).test-image' -j $(JOBS)
+ $(INSTALL) '$(BUILD_DIR).test-image/convert_raw_image_to_inr.exe' '$(PREFIX)/$(TARGET)/bin/test-cgalimgio.exe'
endef