mac - cmake_paths does not work directly on mac

main
Luis Díaz Más 4 years ago
parent 4c5c8538f5
commit 59a80eba2e

@ -27,6 +27,8 @@ jobs:
conan profile new --detect default
conan profile show default
conan install .. -o webready=True --build missing
# Hack: Delete cmake_find_package generated files to fix compilation on mac.
rm Find*
- name: Build
run: |
@ -38,7 +40,6 @@ jobs:
run: |
cd build
cmake --build . --target install
# tree install Not available on Mac
- name: Test
env:

@ -103,6 +103,8 @@ jobs:
conan profile new --detect default
conan profile show default
conan install .. -o webready=True --build missing
# Hack: Delete cmake_find_package generated files to fix compilation on mac.
rm Find*
- name: build and compile
run: |

@ -1,6 +1,15 @@
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
if (APPLE)
# On Apple, we use the conan cmake_paths generator
if (EXISTS ${CMAKE_BINARY_DIR}/conan_paths.cmake)
include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
endif()
else()
# Otherwise, we rely on the conan cmake_find_package generator
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
endif()
find_package (Python3 COMPONENTS Interpreter REQUIRED)

@ -4,7 +4,7 @@ from conans.model.version import Version
class Exiv2Conan(ConanFile):
settings = 'os', 'compiler', 'build_type', 'arch'
generators = 'cmake_find_package'
generators = 'cmake_find_package', 'cmake_paths'
options = {'unitTests': [True, False],
'xmp': [True, False],
'iconv': [True, False],

Loading…
Cancel
Save