Skip to content

Commit

Permalink
(#11608) osmanip: add version 4.1.0
Browse files Browse the repository at this point in the history
* osmanip: add version 4.1.0

* use target_sources with generator expression
  • Loading branch information
toge authored Jul 18, 2022
1 parent bd8dd42 commit b25cd44
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
27 changes: 12 additions & 15 deletions recipes/osmanip/all/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.13)
project(osmanip LANGUAGES CXX)

include(conanbuildinfo.cmake)
conan_basic_setup(KEEP_RPATHS)

find_package(arsenalgear REQUIRED CONFIG)

set(osmanip_src
add_library(osmanip)
target_sources(osmanip PRIVATE
source_subfolder/src/graphics/canvas.cpp
source_subfolder/src/graphics/plot_2D.cpp
source_subfolder/src/manipulators/csmanip.cpp
$<$<VERSION_EQUAL:${OSMANIP_VERSION},4.0.0>:
source_subfolder/src/manipulators/csmanip.cpp
>
$<$<VERSION_GREATER:${OSMANIP_VERSION},4.0.0>:
source_subfolder/src/manipulators/printer.cpp
source_subfolder/src/manipulators/cursor.cpp
source_subfolder/src/manipulators/common.cpp
source_subfolder/src/manipulators/colsty.cpp
>
source_subfolder/src/progressbar/progress_bar.cpp
source_subfolder/src/utility/windows.cpp
)

set(osmanip_inc
source_subfolder/include/graphics/canvas.hpp
source_subfolder/include/graphics/plot_2D.hpp
source_subfolder/include/manipulators/csmanip.hpp
source_subfolder/include/progressbar/multi_progress_bar.hpp
source_subfolder/include/progressbar/progress_bar.hpp
source_subfolder/include/utility/windows.hpp
)


add_library(osmanip ${osmanip_src})
target_include_directories(osmanip PUBLIC source_subfolder/include/)
target_compile_features(osmanip PUBLIC cxx_std_17)
set_target_properties(osmanip PROPERTIES
Expand Down
3 changes: 3 additions & 0 deletions recipes/osmanip/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"4.1.0":
url: "https://github.com/JustWhit3/osmanip/archive/refs/tags/v4.1.0.tar.gz"
sha256: "9830316fea29300aeebadb0cd6cddd6f291a8fa04c397bca9666d045815d1d53"
"4.0.0":
url: "https://github.com/JustWhit3/osmanip/archive/refs/tags/v4.0.0.tar.gz"
sha256: "c6848e1d9b15eb409af88efeee7cd1ce87374ea7ac87424f5d2cf30104f098a0"
Expand Down
1 change: 1 addition & 0 deletions recipes/osmanip/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def source(self):
@functools.lru_cache(1)
def _configure_cmake(self):
cmake = CMake(self)
cmake.definitions["OSMANIP_VERSION"] = str(self.version)
cmake.configure()
return cmake

Expand Down
5 changes: 5 additions & 0 deletions recipes/osmanip/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
#include "osmanip/utility/windows.hpp"
#endif

// Since 4.1.0, options.hpp for `osm::OPTION` is added.
#if __has_include("osmanip/utility/options.hpp")
# include "osmanip/utility/options.hpp"
#endif

// STD headers
#include <chrono>
#include <iostream>
Expand Down
2 changes: 2 additions & 0 deletions recipes/osmanip/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"4.1.0":
folder: all
"4.0.0":
folder: all

0 comments on commit b25cd44

Please sign in to comment.