From a66b41c079782f0c48650b91ea49021cbd7cfccb Mon Sep 17 00:00:00 2001 From: toge Date: Mon, 8 Jul 2024 00:05:26 +0900 Subject: [PATCH 01/13] minmea: add recipe --- recipes/minmea/all/CMakeLists.txt | 13 ++++ recipes/minmea/all/conandata.yml | 9 +++ recipes/minmea/all/conanfile.py | 69 +++++++++++++++++++ .../minmea/all/patches/0001-fix-cmake.patch | 50 ++++++++++++++ .../minmea/all/test_package/CMakeLists.txt | 7 ++ recipes/minmea/all/test_package/conanfile.py | 26 +++++++ .../minmea/all/test_package/test_package.c | 69 +++++++++++++++++++ recipes/minmea/config.yml | 3 + 8 files changed, 246 insertions(+) create mode 100644 recipes/minmea/all/CMakeLists.txt create mode 100644 recipes/minmea/all/conandata.yml create mode 100644 recipes/minmea/all/conanfile.py create mode 100644 recipes/minmea/all/patches/0001-fix-cmake.patch create mode 100644 recipes/minmea/all/test_package/CMakeLists.txt create mode 100644 recipes/minmea/all/test_package/conanfile.py create mode 100644 recipes/minmea/all/test_package/test_package.c create mode 100644 recipes/minmea/config.yml diff --git a/recipes/minmea/all/CMakeLists.txt b/recipes/minmea/all/CMakeLists.txt new file mode 100644 index 0000000000000..dc76a01bdca7a --- /dev/null +++ b/recipes/minmea/all/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.4) +project(wrapper LANGUAGES CXX) + +add_subdirectory(${MINMEA_SRC_DIR}) + +include(GNUInstallDirs) + +install(TARGETS minmea + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") +install(FILES ${MINMEA_SRC_DIR}/minmea.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/recipes/minmea/all/conandata.yml b/recipes/minmea/all/conandata.yml new file mode 100644 index 0000000000000..57b94adeeabf2 --- /dev/null +++ b/recipes/minmea/all/conandata.yml @@ -0,0 +1,9 @@ +sources: + "cci.20230620": + url: "https://github.com/kosma/minmea/archive/e368d847d75abd891c651f7d30ce5efb6681adb7.tar.gz" + sha256: "9b845dfc7f4475c17710a0ac0823b11a6946df7b20dfacd02b03921826eeab3a" +patches: + "cci.20230620": + - patch_file: "patches/0001-fix-cmake.patch" + patch_description: "correct the order of cmake min and project, disable example and test" + patch_type: "conan" diff --git a/recipes/minmea/all/conanfile.py b/recipes/minmea/all/conanfile.py new file mode 100644 index 0000000000000..169d0448bbe67 --- /dev/null +++ b/recipes/minmea/all/conanfile.py @@ -0,0 +1,69 @@ +from conan import ConanFile +from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +import os + +required_conan_version = ">=1.53.0" + +class MinmeaConan(ConanFile): + name = "minmea" + description = "a lightweight GPS NMEA 0183 parser library in pure C" + license = "WTFPL" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/kosma/minmea" + topics = ("gps", "NMEA", "parser") + package_type = "library" + settings = "os", "arch", "compiler", "build_type" + options = { + "shared": [True, False], + "fPIC": [True, False], + } + default_options = { + "shared": False, + "fPIC": True, + } + exports_sources = ["CMakeLists.txt"] + + def export_sources(self): + export_conandata_patches(self) + + def config_options(self): + if self.settings.os == "Windows": + del self.options.fPIC + + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") + + def build_requirements(self): + self.tool_requires("pkgconf/2.2.0") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["MINMEA_SRC_DIR"] = self.source_folder.replace("\\", "/") + tc.generate() + deps = CMakeDeps(self) + deps.generate() + + def build(self): + apply_conandata_patches(self) + cmake = CMake(self) + cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) + cmake.build() + + def package(self): + copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.libs = ["minmea"] + diff --git a/recipes/minmea/all/patches/0001-fix-cmake.patch b/recipes/minmea/all/patches/0001-fix-cmake.patch new file mode 100644 index 0000000000000..e72f5dbc63a5d --- /dev/null +++ b/recipes/minmea/all/patches/0001-fix-cmake.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b96e1d7..1fe282a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,30 +1,30 @@ + cmake_minimum_required(VERSION 3.3) + +-enable_testing() ++# enable_testing() + + project(minmea) + +-find_package(Threads REQUIRED) # Workaround for https://github.com/libcheck/check/issues/48#issuecomment-322965461 +-find_package(PkgConfig) +-pkg_check_modules(CHECK REQUIRED check) +-link_directories(${CHECK_LIBRARY_DIRS}) +- ++# find_package(Threads REQUIRED) # Workaround for https://github.com/libcheck/check/issues/48#issuecomment-322965461 ++# find_package(PkgConfig) ++# pkg_check_modules(CHECK REQUIRED check) ++# link_directories(${CHECK_LIBRARY_DIRS}) ++if(NOT MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra -Werror -std=c99") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE") +- ++endif() + set(minmea_SRCS minmea.c minmea.h) + add_library(minmea ${minmea_SRCS}) + +-add_executable(example example.c) +-target_link_libraries(example minmea) ++# add_executable(example example.c) ++# target_link_libraries(example minmea) + +-add_executable(tests tests.c) +-target_link_libraries(tests minmea ${CHECK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) +-target_include_directories(tests PUBLIC ${CHECK_INCLUDE_DIRS}) +-target_compile_options(tests PUBLIC ${CHECK_CFLAGS_OTHER}) ++# add_executable(tests tests.c) ++# target_link_libraries(tests minmea ${CHECK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) ++# target_include_directories(tests PUBLIC ${CHECK_INCLUDE_DIRS}) ++# target_compile_options(tests PUBLIC ${CHECK_CFLAGS_OTHER}) + +-add_test(NAME tests COMMAND $) +-list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") ++# add_test(NAME tests COMMAND $) ++# list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") + + find_program(SCAN_FOUND scan-build) + diff --git a/recipes/minmea/all/test_package/CMakeLists.txt b/recipes/minmea/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..3db1c41fa7a2d --- /dev/null +++ b/recipes/minmea/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C) + +find_package(minmea REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.c) +target_link_libraries(${PROJECT_NAME} PRIVATE minmea::minmea) diff --git a/recipes/minmea/all/test_package/conanfile.py b/recipes/minmea/all/test_package/conanfile.py new file mode 100644 index 0000000000000..ef5d7042163ec --- /dev/null +++ b/recipes/minmea/all/test_package/conanfile.py @@ -0,0 +1,26 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/minmea/all/test_package/test_package.c b/recipes/minmea/all/test_package/test_package.c new file mode 100644 index 0000000000000..ec96e686aee52 --- /dev/null +++ b/recipes/minmea/all/test_package/test_package.c @@ -0,0 +1,69 @@ +#include +#include "minmea.h" + +char* nmea_data[] = { +"$GPGGA,155246.585,5231.171,N,01321.830,E,1,12,1.0,0.0,M,0.0,M,,*6F", +"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", +"$GPRMC,155246.585,A,5231.171,N,01321.830,E,5768.0,100.5,120224,000.0,W*44", +"$GPGGA,155247.585,5230.707,N,01324.349,E,1,12,1.0,0.0,M,0.0,M,,*68", +"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", +"$GPRMC,155247.585,A,5230.707,N,01324.349,E,5522.0,077.3,120224,000.0,W*48", +"$GPGGA,155248.585,5231.236,N,01326.712,E,1,12,1.0,0.0,M,0.0,M,,*69", +"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", +"$GPRMC,155248.585,A,5231.236,N,01326.712,E,3306.0,067.4,120224,000.0,W*49", +"$GPGGA,155249.585,5231.753,N,01327.959,E,1,12,1.0,0.0,M,0.0,M,,*6E", +"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", +"$GPRMC,155249.585,A,5231.753,N,01327.959,E,1752.9,291.8,120224,000.0,W*47", +"$GPGGA,155250.585,5232.020,N,01327.289,E,1,12,1.0,0.0,M,0.0,M,,*60", +"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", +"$GPRMC,155250.585,A,5232.020,N,01327.289,E,8124.7,266.3,120224,000.0,W*4A", +"$GPGGA,155251.585,5231.785,N,01323.602,E,1,12,1.0,0.0,M,0.0,M,,*69", +"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", +"$GPRMC,155251.585,A,5231.785,N,01323.602,E,5026.3,260.0,120224,000.0,W*4C", +"$GPGGA,155252.585,5231.399,N,01321.398,E,1,12,1.0,0.0,M,0.0,M,,*67", +"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", +"$GPRMC,155252.585,A,5231.399,N,01321.398,E,3905.6,194.0,120224,000.0,W*41", +"$GPGGA,155253.585,5230.328,N,01321.130,E,1,12,1.0,0.0,M,0.0,M,,*6D", +"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", +"$GPRMC,155253.585,A,5230.328,N,01321.130,E,3905.6,000.0,120224,000.0,W*47", +"$GPGGA,155254.585,5230.328,N,01321.130,E,1,12,1.0,0.0,M,0.0,M,,*6A", +"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", +"$GPRMC,155254.585,A,5230.328,N,01321.130,E,000.0,000.0,120224,000.0,W*79", +}; + +int main(void) { + for (int i = 0; i < sizeof(nmea_data) / sizeof(nmea_data[0]); i++) { + char* line = nmea_data[i]; + switch (minmea_sentence_id(line, false)) { + case MINMEA_SENTENCE_RMC: { + struct minmea_sentence_rmc frame; + if (minmea_parse_rmc(&frame, line)) { + printf("$RMC: raw coordinates and speed: (%d/%d,%d/%d) %d/%d\n", frame.latitude.value, frame.latitude.scale, frame.longitude.value, frame.longitude.scale, frame.speed.value, + frame.speed.scale); + printf("$RMC fixed-point coordinates and speed scaled to three decimal places: (%d,%d) %d\n", minmea_rescale(&frame.latitude, 1000), minmea_rescale(&frame.longitude, 1000), + minmea_rescale(&frame.speed, 1000)); + printf("$RMC floating point degree coordinates and speed: (%f,%f) %f\n", minmea_tocoord(&frame.latitude), minmea_tocoord(&frame.longitude), minmea_tofloat(&frame.speed)); + } + } break; + + case MINMEA_SENTENCE_GGA: { + struct minmea_sentence_gga frame; + if (minmea_parse_gga(&frame, line)) { + printf("$GGA: fix quality: %d\n", frame.fix_quality); + } + } break; + + case MINMEA_SENTENCE_GSV: { + struct minmea_sentence_gsv frame; + if (minmea_parse_gsv(&frame, line)) { + printf("$GSV: message %d of %d\n", frame.msg_nr, frame.total_msgs); + printf("$GSV: satellites in view: %d\n", frame.total_sats); + for (int i = 0; i < 4; i++) + printf("$GSV: sat nr %d, elevation: %d, azimuth: %d, snr: %d dbm\n", frame.sats[i].nr, frame.sats[i].elevation, frame.sats[i].azimuth, frame.sats[i].snr); + } + } break; + } + } + + return 0; +} diff --git a/recipes/minmea/config.yml b/recipes/minmea/config.yml new file mode 100644 index 0000000000000..19c6c4f309cfb --- /dev/null +++ b/recipes/minmea/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20230620": + folder: all From 50098c40b89bb23b09a3884b6a050392ef0a1d99 Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 12 Jul 2024 01:58:14 +0900 Subject: [PATCH 02/13] drop support msvc --- recipes/minmea/all/conanfile.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/minmea/all/conanfile.py b/recipes/minmea/all/conanfile.py index 169d0448bbe67..140e308ad05c6 100644 --- a/recipes/minmea/all/conanfile.py +++ b/recipes/minmea/all/conanfile.py @@ -1,6 +1,8 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.microsoft import is_msvc +from conaon.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.53.0" @@ -40,6 +42,10 @@ def configure(self): def layout(self): cmake_layout(self, src_folder="src") + def validate(self): + if is_msvc(self): + raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc.(yet)") + def build_requirements(self): self.tool_requires("pkgconf/2.2.0") From 76f9ffe56d5e10f16022f419530ed274513bba6e Mon Sep 17 00:00:00 2001 From: toge Date: Fri, 12 Jul 2024 02:08:56 +0900 Subject: [PATCH 03/13] remove trailing newlines --- recipes/minmea/all/conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes/minmea/all/conanfile.py b/recipes/minmea/all/conanfile.py index 140e308ad05c6..6133034bb13cf 100644 --- a/recipes/minmea/all/conanfile.py +++ b/recipes/minmea/all/conanfile.py @@ -72,4 +72,3 @@ def package(self): def package_info(self): self.cpp_info.libs = ["minmea"] - From 1434adb9c584cbecb76219bbdc0f679d832ffdf3 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 14 Jul 2024 01:49:36 +0900 Subject: [PATCH 04/13] fix typo --- recipes/minmea/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/minmea/all/conanfile.py b/recipes/minmea/all/conanfile.py index 6133034bb13cf..8f3b111240256 100644 --- a/recipes/minmea/all/conanfile.py +++ b/recipes/minmea/all/conanfile.py @@ -2,7 +2,7 @@ from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.microsoft import is_msvc -from conaon.errors import ConanInvalidConfiguration +from conan.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.53.0" From ae991f3ac24f5bcc7cc420188434b4a8c0a1187c Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 17 Jul 2024 00:17:13 +0900 Subject: [PATCH 05/13] require pkgconf only on tools.gnu:pkg_config is false MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Abril Rincón Blanco --- recipes/minmea/all/conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/minmea/all/conanfile.py b/recipes/minmea/all/conanfile.py index 8f3b111240256..835bd5f743355 100644 --- a/recipes/minmea/all/conanfile.py +++ b/recipes/minmea/all/conanfile.py @@ -47,7 +47,8 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc.(yet)") def build_requirements(self): - self.tool_requires("pkgconf/2.2.0") + if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): + self.tool_requires("pkgconf/2.2.0") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) From 693d0d8e4ff73461b5edac2d003207f4acab334e Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 17 Jul 2024 00:48:40 +0900 Subject: [PATCH 06/13] simplify test_package.c --- .../minmea/all/test_package/test_package.c | 63 ++----------------- 1 file changed, 5 insertions(+), 58 deletions(-) diff --git a/recipes/minmea/all/test_package/test_package.c b/recipes/minmea/all/test_package/test_package.c index ec96e686aee52..9c222e438c9ae 100644 --- a/recipes/minmea/all/test_package/test_package.c +++ b/recipes/minmea/all/test_package/test_package.c @@ -1,67 +1,14 @@ #include #include "minmea.h" -char* nmea_data[] = { -"$GPGGA,155246.585,5231.171,N,01321.830,E,1,12,1.0,0.0,M,0.0,M,,*6F", -"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", -"$GPRMC,155246.585,A,5231.171,N,01321.830,E,5768.0,100.5,120224,000.0,W*44", -"$GPGGA,155247.585,5230.707,N,01324.349,E,1,12,1.0,0.0,M,0.0,M,,*68", -"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", -"$GPRMC,155247.585,A,5230.707,N,01324.349,E,5522.0,077.3,120224,000.0,W*48", -"$GPGGA,155248.585,5231.236,N,01326.712,E,1,12,1.0,0.0,M,0.0,M,,*69", -"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", -"$GPRMC,155248.585,A,5231.236,N,01326.712,E,3306.0,067.4,120224,000.0,W*49", -"$GPGGA,155249.585,5231.753,N,01327.959,E,1,12,1.0,0.0,M,0.0,M,,*6E", -"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", -"$GPRMC,155249.585,A,5231.753,N,01327.959,E,1752.9,291.8,120224,000.0,W*47", -"$GPGGA,155250.585,5232.020,N,01327.289,E,1,12,1.0,0.0,M,0.0,M,,*60", -"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", -"$GPRMC,155250.585,A,5232.020,N,01327.289,E,8124.7,266.3,120224,000.0,W*4A", -"$GPGGA,155251.585,5231.785,N,01323.602,E,1,12,1.0,0.0,M,0.0,M,,*69", -"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", -"$GPRMC,155251.585,A,5231.785,N,01323.602,E,5026.3,260.0,120224,000.0,W*4C", -"$GPGGA,155252.585,5231.399,N,01321.398,E,1,12,1.0,0.0,M,0.0,M,,*67", -"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", -"$GPRMC,155252.585,A,5231.399,N,01321.398,E,3905.6,194.0,120224,000.0,W*41", -"$GPGGA,155253.585,5230.328,N,01321.130,E,1,12,1.0,0.0,M,0.0,M,,*6D", -"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", -"$GPRMC,155253.585,A,5230.328,N,01321.130,E,3905.6,000.0,120224,000.0,W*47", -"$GPGGA,155254.585,5230.328,N,01321.130,E,1,12,1.0,0.0,M,0.0,M,,*6A", -"$GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30", -"$GPRMC,155254.585,A,5230.328,N,01321.130,E,000.0,000.0,120224,000.0,W*79", -}; int main(void) { - for (int i = 0; i < sizeof(nmea_data) / sizeof(nmea_data[0]); i++) { - char* line = nmea_data[i]; - switch (minmea_sentence_id(line, false)) { - case MINMEA_SENTENCE_RMC: { - struct minmea_sentence_rmc frame; - if (minmea_parse_rmc(&frame, line)) { - printf("$RMC: raw coordinates and speed: (%d/%d,%d/%d) %d/%d\n", frame.latitude.value, frame.latitude.scale, frame.longitude.value, frame.longitude.scale, frame.speed.value, - frame.speed.scale); - printf("$RMC fixed-point coordinates and speed scaled to three decimal places: (%d,%d) %d\n", minmea_rescale(&frame.latitude, 1000), minmea_rescale(&frame.longitude, 1000), - minmea_rescale(&frame.speed, 1000)); - printf("$RMC floating point degree coordinates and speed: (%f,%f) %f\n", minmea_tocoord(&frame.latitude), minmea_tocoord(&frame.longitude), minmea_tofloat(&frame.speed)); - } - } break; + char* nmea_data = "$GPGGA,155246.585,5231.171,N,01321.830,E,1,12,1.0,0.0,M,0.0,M,,*6F"; - case MINMEA_SENTENCE_GGA: { - struct minmea_sentence_gga frame; - if (minmea_parse_gga(&frame, line)) { - printf("$GGA: fix quality: %d\n", frame.fix_quality); - } - } break; - - case MINMEA_SENTENCE_GSV: { - struct minmea_sentence_gsv frame; - if (minmea_parse_gsv(&frame, line)) { - printf("$GSV: message %d of %d\n", frame.msg_nr, frame.total_msgs); - printf("$GSV: satellites in view: %d\n", frame.total_sats); - for (int i = 0; i < 4; i++) - printf("$GSV: sat nr %d, elevation: %d, azimuth: %d, snr: %d dbm\n", frame.sats[i].nr, frame.sats[i].elevation, frame.sats[i].azimuth, frame.sats[i].snr); - } - } break; + if (minmea_sentence_id(nmea_data, false) == MINMEA_SENTENCE_GGA) { + struct minmea_sentence_gga frame; + if (minmea_parse_gga(&frame, nmea_data)) { + printf("$GGA: fix quality: %d\n", frame.fix_quality); } } From 477d3b98d946430abddab494755ccbeb99402556 Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 17 Jul 2024 00:49:02 +0900 Subject: [PATCH 07/13] support MSVC --- recipes/minmea/all/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/minmea/all/CMakeLists.txt b/recipes/minmea/all/CMakeLists.txt index dc76a01bdca7a..de89cba9e372d 100644 --- a/recipes/minmea/all/CMakeLists.txt +++ b/recipes/minmea/all/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.4) -project(wrapper LANGUAGES CXX) +project(wrapper LANGUAGES C) add_subdirectory(${MINMEA_SRC_DIR}) @@ -11,3 +11,8 @@ install(TARGETS minmea ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") install(FILES ${MINMEA_SRC_DIR}/minmea.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +if(MSVC) + install(FILES ${MINMEA_SRC_DIR}/compat/minmea_compat_windows.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + RENAME minmea_compat.h) +endif() From 7f0858f0a4afbb66db59819668dec3138c1cdfff Mon Sep 17 00:00:00 2001 From: toge Date: Wed, 17 Jul 2024 00:49:19 +0900 Subject: [PATCH 08/13] define MINMEA_INCLUDE_COMPAT in MSVC --- recipes/minmea/all/conanfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes/minmea/all/conanfile.py b/recipes/minmea/all/conanfile.py index 835bd5f743355..894e9399c6931 100644 --- a/recipes/minmea/all/conanfile.py +++ b/recipes/minmea/all/conanfile.py @@ -56,6 +56,8 @@ def source(self): def generate(self): tc = CMakeToolchain(self) tc.variables["MINMEA_SRC_DIR"] = self.source_folder.replace("\\", "/") + if is_msvc(self): + tc.preprocessor_definitions["MINMEA_INCLUDE_COMPAT"] = "1" tc.generate() deps = CMakeDeps(self) deps.generate() @@ -73,3 +75,5 @@ def package(self): def package_info(self): self.cpp_info.libs = ["minmea"] + if is_msvc(self): + self.cpp_info.defines.append("MINMEA_INCLUDE_COMPAT") From ad68ff66e23335560d2a6f50f6bfa00fbb329f90 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 11 Aug 2024 17:13:58 +0900 Subject: [PATCH 09/13] follow version policy Co-authored-by: Martin Valgur --- recipes/minmea/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/minmea/all/conandata.yml b/recipes/minmea/all/conandata.yml index 57b94adeeabf2..93bdd4959eadb 100644 --- a/recipes/minmea/all/conandata.yml +++ b/recipes/minmea/all/conandata.yml @@ -1,5 +1,5 @@ sources: - "cci.20230620": + "0.3.0.cci.20230620": url: "https://github.com/kosma/minmea/archive/e368d847d75abd891c651f7d30ce5efb6681adb7.tar.gz" sha256: "9b845dfc7f4475c17710a0ac0823b11a6946df7b20dfacd02b03921826eeab3a" patches: From 235f16c9d9b45b469706f42c4a885f7c0447a7f3 Mon Sep 17 00:00:00 2001 From: toge Date: Sun, 11 Aug 2024 17:15:34 +0900 Subject: [PATCH 10/13] follow version policy part 2 --- recipes/minmea/all/conandata.yml | 2 +- recipes/minmea/config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/minmea/all/conandata.yml b/recipes/minmea/all/conandata.yml index 93bdd4959eadb..bf57de3a73b6a 100644 --- a/recipes/minmea/all/conandata.yml +++ b/recipes/minmea/all/conandata.yml @@ -3,7 +3,7 @@ sources: url: "https://github.com/kosma/minmea/archive/e368d847d75abd891c651f7d30ce5efb6681adb7.tar.gz" sha256: "9b845dfc7f4475c17710a0ac0823b11a6946df7b20dfacd02b03921826eeab3a" patches: - "cci.20230620": + "0.3.0.cci.20230620": - patch_file: "patches/0001-fix-cmake.patch" patch_description: "correct the order of cmake min and project, disable example and test" patch_type: "conan" diff --git a/recipes/minmea/config.yml b/recipes/minmea/config.yml index 19c6c4f309cfb..85c5d6a070371 100644 --- a/recipes/minmea/config.yml +++ b/recipes/minmea/config.yml @@ -1,3 +1,3 @@ versions: - "cci.20230620": + "0.3.0.cci.20230620": folder: all From c872a26b0bb35b4a0172b401ced6c3408c69ca4a Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 11 Sep 2024 10:31:36 +0200 Subject: [PATCH 11/13] Simplify minmea recipe Signed-off-by: Uilian Ries --- recipes/minmea/all/CMakeLists.txt | 18 ------- recipes/minmea/all/conandata.yml | 5 -- recipes/minmea/all/conanfile.py | 47 ++++++++++------- .../minmea/all/patches/0001-fix-cmake.patch | 50 ------------------- 4 files changed, 28 insertions(+), 92 deletions(-) delete mode 100644 recipes/minmea/all/CMakeLists.txt delete mode 100644 recipes/minmea/all/patches/0001-fix-cmake.patch diff --git a/recipes/minmea/all/CMakeLists.txt b/recipes/minmea/all/CMakeLists.txt deleted file mode 100644 index de89cba9e372d..0000000000000 --- a/recipes/minmea/all/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -cmake_minimum_required(VERSION 3.4) -project(wrapper LANGUAGES C) - -add_subdirectory(${MINMEA_SRC_DIR}) - -include(GNUInstallDirs) - -install(TARGETS minmea - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") -install(FILES ${MINMEA_SRC_DIR}/minmea.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) -if(MSVC) - install(FILES ${MINMEA_SRC_DIR}/compat/minmea_compat_windows.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - RENAME minmea_compat.h) -endif() diff --git a/recipes/minmea/all/conandata.yml b/recipes/minmea/all/conandata.yml index bf57de3a73b6a..439c43fb1923f 100644 --- a/recipes/minmea/all/conandata.yml +++ b/recipes/minmea/all/conandata.yml @@ -2,8 +2,3 @@ sources: "0.3.0.cci.20230620": url: "https://github.com/kosma/minmea/archive/e368d847d75abd891c651f7d30ce5efb6681adb7.tar.gz" sha256: "9b845dfc7f4475c17710a0ac0823b11a6946df7b20dfacd02b03921826eeab3a" -patches: - "0.3.0.cci.20230620": - - patch_file: "patches/0001-fix-cmake.patch" - patch_description: "correct the order of cmake min and project, disable example and test" - patch_type: "conan" diff --git a/recipes/minmea/all/conanfile.py b/recipes/minmea/all/conanfile.py index 894e9399c6931..5545a745a08d0 100644 --- a/recipes/minmea/all/conanfile.py +++ b/recipes/minmea/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.files import copy, copy, get, replace_in_file, rename from conan.tools.microsoft import is_msvc from conan.errors import ConanInvalidConfiguration import os @@ -10,7 +10,7 @@ class MinmeaConan(ConanFile): name = "minmea" description = "a lightweight GPS NMEA 0183 parser library in pure C" - license = "WTFPL" + license = ("WTFPL", "MIT", "LGPL-3.0-or-later") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/kosma/minmea" topics = ("gps", "NMEA", "parser") @@ -24,10 +24,6 @@ class MinmeaConan(ConanFile): "shared": False, "fPIC": True, } - exports_sources = ["CMakeLists.txt"] - - def export_sources(self): - export_conandata_patches(self) def config_options(self): if self.settings.os == "Windows": @@ -38,40 +34,53 @@ def configure(self): self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") + if is_msvc(self): + del self.options.shared + self.package_type = "static-library" def layout(self): cmake_layout(self, src_folder="src") def validate(self): + # FIXME: Windows supported: https://github.com/kosma/minmea?tab=readme-ov-file#compatibility if is_msvc(self): - raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc.(yet)") - - def build_requirements(self): - if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str): - self.tool_requires("pkgconf/2.2.0") + raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc. Contributions are welcome.") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - tc.variables["MINMEA_SRC_DIR"] = self.source_folder.replace("\\", "/") - if is_msvc(self): - tc.preprocessor_definitions["MINMEA_INCLUDE_COMPAT"] = "1" + #if is_msvc(self): + # tc.preprocessor_definitions["MINMEA_INCLUDE_COMPAT"] = "1" tc.generate() deps = CMakeDeps(self) deps.generate() + def _patch_sources(self): + # INFO: Disable pkg-config searching for the test library libcheck + replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), + "pkg_check_modules", + "# pkg_check_modules") + def build(self): - apply_conandata_patches(self) + self._patch_sources() cmake = CMake(self) - cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) - cmake.build() + cmake.configure() + cmake.build(target="minmea") def package(self): copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) - cmake = CMake(self) - cmake.install() + copy(self, "LICENSE.*", self.source_folder, os.path.join(self.package_folder, "licenses")) + copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include"), keep_path=False) + copy(self, "libminmea.a", self.build_folder, os.path.join(self.package_folder, "lib")) + copy(self, "libminmea.so", self.build_folder, os.path.join(self.package_folder, "lib")) + copy(self, "libminmea.dylib", self.build_folder, os.path.join(self.package_folder, "lib")) + if self.settings.os == "Windows": + copy(self, "minmea.lib", self.build_folder, os.path.join(self.package_folder, "lib")) + # INFO: https://github.com/kosma/minmea?tab=readme-ov-file#compatibility Need to rename the file + rename(self, os.path.join(self.package_folder, "include", "minmea_compat_windows.h"), + os.path.join(self.package_folder, "include", "minmea_compat.h")) def package_info(self): self.cpp_info.libs = ["minmea"] diff --git a/recipes/minmea/all/patches/0001-fix-cmake.patch b/recipes/minmea/all/patches/0001-fix-cmake.patch deleted file mode 100644 index e72f5dbc63a5d..0000000000000 --- a/recipes/minmea/all/patches/0001-fix-cmake.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b96e1d7..1fe282a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,30 +1,30 @@ - cmake_minimum_required(VERSION 3.3) - --enable_testing() -+# enable_testing() - - project(minmea) - --find_package(Threads REQUIRED) # Workaround for https://github.com/libcheck/check/issues/48#issuecomment-322965461 --find_package(PkgConfig) --pkg_check_modules(CHECK REQUIRED check) --link_directories(${CHECK_LIBRARY_DIRS}) -- -+# find_package(Threads REQUIRED) # Workaround for https://github.com/libcheck/check/issues/48#issuecomment-322965461 -+# find_package(PkgConfig) -+# pkg_check_modules(CHECK REQUIRED check) -+# link_directories(${CHECK_LIBRARY_DIRS}) -+if(NOT MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra -Werror -std=c99") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_C_SOURCE") -- -+endif() - set(minmea_SRCS minmea.c minmea.h) - add_library(minmea ${minmea_SRCS}) - --add_executable(example example.c) --target_link_libraries(example minmea) -+# add_executable(example example.c) -+# target_link_libraries(example minmea) - --add_executable(tests tests.c) --target_link_libraries(tests minmea ${CHECK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) --target_include_directories(tests PUBLIC ${CHECK_INCLUDE_DIRS}) --target_compile_options(tests PUBLIC ${CHECK_CFLAGS_OTHER}) -+# add_executable(tests tests.c) -+# target_link_libraries(tests minmea ${CHECK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) -+# target_include_directories(tests PUBLIC ${CHECK_INCLUDE_DIRS}) -+# target_compile_options(tests PUBLIC ${CHECK_CFLAGS_OTHER}) - --add_test(NAME tests COMMAND $) --list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") -+# add_test(NAME tests COMMAND $) -+# list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") - - find_program(SCAN_FOUND scan-build) - From 24cc4cf682ee958886983cac444b72dc2b4df1cb Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 11 Sep 2024 09:33:54 +0200 Subject: [PATCH 12/13] Build on Windows Signed-off-by: Uilian Ries --- recipes/minmea/all/conandata.yml | 8 ++++ recipes/minmea/all/conanfile.py | 42 ++++++++----------- .../001-disable-pkgconfig-libcheck.patch | 12 ++++++ .../all/patches/002-windows-support.patch | 16 +++++++ .../minmea/all/test_package/CMakeLists.txt | 1 + 5 files changed, 55 insertions(+), 24 deletions(-) create mode 100644 recipes/minmea/all/patches/001-disable-pkgconfig-libcheck.patch create mode 100644 recipes/minmea/all/patches/002-windows-support.patch diff --git a/recipes/minmea/all/conandata.yml b/recipes/minmea/all/conandata.yml index 439c43fb1923f..f6a2a3a0d5950 100644 --- a/recipes/minmea/all/conandata.yml +++ b/recipes/minmea/all/conandata.yml @@ -2,3 +2,11 @@ sources: "0.3.0.cci.20230620": url: "https://github.com/kosma/minmea/archive/e368d847d75abd891c651f7d30ce5efb6681adb7.tar.gz" sha256: "9b845dfc7f4475c17710a0ac0823b11a6946df7b20dfacd02b03921826eeab3a" +patches: + "0.3.0.cci.20230620": + - patch_file: "patches/001-disable-pkgconfig-libcheck.patch" + patch_description: "Do not search for libcheck - Exclusive for testing" + patch_type: "conan" + - patch_file: "patches/002-windows-support.patch" + patch_description: "Manage compat header file for Windows" + patch_type: "portability" diff --git a/recipes/minmea/all/conanfile.py b/recipes/minmea/all/conanfile.py index 5545a745a08d0..1054fac6ceeac 100644 --- a/recipes/minmea/all/conanfile.py +++ b/recipes/minmea/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, copy, get, replace_in_file, rename +from conan.tools.files import copy, copy, get, replace_in_file, rename, apply_conandata_patches, export_conandata_patches from conan.tools.microsoft import is_msvc from conan.errors import ConanInvalidConfiguration import os @@ -25,6 +25,9 @@ class MinmeaConan(ConanFile): "fPIC": True, } + def export_sources(self): + export_conandata_patches(self) + def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -34,37 +37,27 @@ def configure(self): self.options.rm_safe("fPIC") self.settings.rm_safe("compiler.cppstd") self.settings.rm_safe("compiler.libcxx") - if is_msvc(self): - del self.options.shared - self.package_type = "static-library" def layout(self): cmake_layout(self, src_folder="src") def validate(self): - # FIXME: Windows supported: https://github.com/kosma/minmea?tab=readme-ov-file#compatibility + # INFO: Windows mingw supported: https://github.com/kosma/minmea?tab=readme-ov-file#compatibility + # INFO: MSVC fails with error C2011: 'timespec': 'struct' type redefinition if is_msvc(self): - raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc. Contributions are welcome.") + raise ConanInvalidConfiguration(f"{self.ref} can not be built on Visual Studio and msvc. Use mingw instead or similar.") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) - #if is_msvc(self): - # tc.preprocessor_definitions["MINMEA_INCLUDE_COMPAT"] = "1" + if self.settings.os == "Windows": + tc.preprocessor_definitions["MINMEA_INCLUDE_COMPAT"] = "1" tc.generate() - deps = CMakeDeps(self) - deps.generate() - - def _patch_sources(self): - # INFO: Disable pkg-config searching for the test library libcheck - replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), - "pkg_check_modules", - "# pkg_check_modules") def build(self): - self._patch_sources() + apply_conandata_patches(self) cmake = CMake(self) cmake.configure() cmake.build(target="minmea") @@ -72,17 +65,18 @@ def build(self): def package(self): copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses")) copy(self, "LICENSE.*", self.source_folder, os.path.join(self.package_folder, "licenses")) - copy(self, "*.h", self.source_folder, os.path.join(self.package_folder, "include"), keep_path=False) + copy(self, "minmea.h", self.source_folder, os.path.join(self.package_folder, "include")) copy(self, "libminmea.a", self.build_folder, os.path.join(self.package_folder, "lib")) copy(self, "libminmea.so", self.build_folder, os.path.join(self.package_folder, "lib")) copy(self, "libminmea.dylib", self.build_folder, os.path.join(self.package_folder, "lib")) if self.settings.os == "Windows": - copy(self, "minmea.lib", self.build_folder, os.path.join(self.package_folder, "lib")) - # INFO: https://github.com/kosma/minmea?tab=readme-ov-file#compatibility Need to rename the file - rename(self, os.path.join(self.package_folder, "include", "minmea_compat_windows.h"), - os.path.join(self.package_folder, "include", "minmea_compat.h")) + copy(self, "libminmea.dll.a", self.build_folder, os.path.join(self.package_folder, "lib")) + copy(self, "libminmea.dll", self.build_folder, os.path.join(self.package_folder, "bin")) + copy(self, "minmea_compat.h", self.source_folder, os.path.join(self.package_folder, "include")) def package_info(self): self.cpp_info.libs = ["minmea"] - if is_msvc(self): - self.cpp_info.defines.append("MINMEA_INCLUDE_COMPAT") + if self.settings.os in ["Linux", "FreeBSD"]: + self.cpp_info.system_libs = ["m"] + if self.settings.os == "Windows": + self.cpp_info.defines = ["MINMEA_INCLUDE_COMPAT=1"] diff --git a/recipes/minmea/all/patches/001-disable-pkgconfig-libcheck.patch b/recipes/minmea/all/patches/001-disable-pkgconfig-libcheck.patch new file mode 100644 index 0000000000000..7e3f4636a811b --- /dev/null +++ b/recipes/minmea/all/patches/001-disable-pkgconfig-libcheck.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b96e1d7..4674f49 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,6 @@ project(minmea) + + find_package(Threads REQUIRED) # Workaround for https://github.com/libcheck/check/issues/48#issuecomment-322965461 + find_package(PkgConfig) +-pkg_check_modules(CHECK REQUIRED check) + link_directories(${CHECK_LIBRARY_DIRS}) + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra -Werror -std=c99") diff --git a/recipes/minmea/all/patches/002-windows-support.patch b/recipes/minmea/all/patches/002-windows-support.patch new file mode 100644 index 0000000000000..8f7360ca6288d --- /dev/null +++ b/recipes/minmea/all/patches/002-windows-support.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4674f49..895b835 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,6 +13,11 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -D_D + + set(minmea_SRCS minmea.c minmea.h) + add_library(minmea ${minmea_SRCS}) ++target_include_directories(minmea PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) ++if (WIN32) ++ configure_file(compat/minmea_compat_windows.h ${CMAKE_CURRENT_SOURCE_DIR}/minmea_compat.h COPYONLY) ++ target_compile_definitions(minmea PRIVATE MINMEA_INCLUDE_COMPAT) ++endif() + + add_executable(example example.c) + target_link_libraries(example minmea) diff --git a/recipes/minmea/all/test_package/CMakeLists.txt b/recipes/minmea/all/test_package/CMakeLists.txt index 3db1c41fa7a2d..62bf6147b6fb5 100644 --- a/recipes/minmea/all/test_package/CMakeLists.txt +++ b/recipes/minmea/all/test_package/CMakeLists.txt @@ -5,3 +5,4 @@ find_package(minmea REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.c) target_link_libraries(${PROJECT_NAME} PRIVATE minmea::minmea) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) From e2cd436ff8a1d1d817766b6dd8d442076c73d0d2 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 11 Sep 2024 13:11:44 +0200 Subject: [PATCH 13/13] Remove ununsed import Signed-off-by: Uilian Ries --- recipes/minmea/all/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/minmea/all/conanfile.py b/recipes/minmea/all/conanfile.py index 1054fac6ceeac..30eb575863037 100644 --- a/recipes/minmea/all/conanfile.py +++ b/recipes/minmea/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import copy, copy, get, replace_in_file, rename, apply_conandata_patches, export_conandata_patches +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, apply_conandata_patches, export_conandata_patches from conan.tools.microsoft import is_msvc from conan.errors import ConanInvalidConfiguration import os