From b09555eee1a65782157afb5fb1250496c9682f9d Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Wed, 20 Sep 2023 17:50:13 +0200 Subject: [PATCH] Lemon as meson subproject --- .gitmodules | 3 +++ meson.build | 7 ++++++- subprojects/lemon-1.3.1 | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) create mode 160000 subprojects/lemon-1.3.1 diff --git a/.gitmodules b/.gitmodules index 812e14e..a7eeee5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "thirdparty/pybind11/pybind11"] path = thirdparty/pybind11/pybind11 url = https://github.com/pybind/pybind11.git +[submodule "subprojects/lemon-1.3.1"] + path = subprojects/lemon-1.3.1 + url = https://github.com/Coloquinte/lemon diff --git a/meson.build b/meson.build index bccb251..da1d331 100644 --- a/meson.build +++ b/meson.build @@ -9,10 +9,15 @@ project('coloquinte', 'cpp', coloquinte_includes = include_directories('src') boost_dep = dependency('boost', required: true) -lemon_dep = dependency('lemon', method : 'cmake') eigen_dep = dependency('eigen3', required: true) thread_dep = dependency('threads', required: true) +cmake =import('cmake') +cmake_opts = cmake.subproject_options() +cmake_opts.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE': true}) +lemon = cmake.subproject('lemon-1.3.1', options: cmake_opts) +lemon_dep = lemon.dependency('lemon') + sources = [ 'src/coloquinte.cpp', 'src/parameters.cpp', diff --git a/subprojects/lemon-1.3.1 b/subprojects/lemon-1.3.1 new file mode 160000 index 0000000..5025265 --- /dev/null +++ b/subprojects/lemon-1.3.1 @@ -0,0 +1 @@ +Subproject commit 50252652bcbcd10932b2bb4d6dab3b62bf54a400