Skip to content

Commit

Permalink
use conan to get date library
Browse files Browse the repository at this point in the history
  • Loading branch information
hassec committed Aug 22, 2022
1 parent ffd1aee commit ce987ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly_Linux_distributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
container:
image: ${{ matrix.container_image }}
env:
CMAKE_FLAGS: -DEXIV2_TEAM_EXTRA_WARNINGS=OFF -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=OFF -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF -DEXIV2_ENABLE_PNG=ON -DCMAKE_INSTALL_PREFIX=install
CMAKE_FLAGS: -DEXIV2_TEAM_EXTRA_WARNINGS=OFF -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=OFF -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF -DEXIV2_ENABLE_PNG=ON -DCMAKE_INSTALL_PREFIX=install -DCONAN_AUTO_INSTALL=ON

steps:
- uses: actions/checkout@v3
Expand Down
10 changes: 2 additions & 8 deletions cmake/findDependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")


include( FetchContent )
FetchContent_Declare( date_src
GIT_REPOSITORY https://github.com/HowardHinnant/date.git
GIT_TAG v3.0.1
)
FetchContent_MakeAvailable(date_src)

if (CONAN_AUTO_INSTALL)
# Download automatically the cmake-conan integration file
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
Expand Down Expand Up @@ -38,6 +30,8 @@ else()
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
endif()

find_package(date REQUIRED)

find_package (Python3 COMPONENTS Interpreter)
if (NOT Python3_Interpreter_FOUND)
message(WARNING "Python3 was not found. Python tests under the 'tests' folder will not be executed")
Expand Down
1 change: 1 addition & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def configure(self):

def requirements(self):
self.requires('zlib/1.2.12')
self.requires('date/3.0.1')

if self.options.webready:
self.requires('libcurl/7.80.0')
Expand Down

0 comments on commit ce987ae

Please sign in to comment.