@@ -28,14 +28,42 @@ if(USE_CONAN)
28
28
if (WIN32 )
29
29
30
30
message (STATUS " ${CONAN_COMPILER_RUNTIME} " )
31
-
31
+
32
32
execute_process (
33
33
COMMAND_ECHO STDOUT
34
34
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
35
35
COMMAND
36
- conan install ${CONAN_FILE_PATH} --output -folder =${CMAKE_BINARY_DIR} /conan_build
36
+ conan install ${CONAN_FILE_PATH} --output -folder =${CMAKE_BINARY_DIR} /_conan_build
37
37
-s build_type =${CMAKE_BUILD_TYPE}
38
38
-s compiler.runtime=${CONAN_COMPILER_RUNTIME} --build =missing)
39
+
40
+ message (STATUS "Cloning private freexl dependency" )
41
+ set (FREEXL_VERSION "2.1.0-dev" )
42
+ FetchContent_Declare(
43
+ freexl
44
+ GIT_REPOSITORY https://github.com/shun2wang/conan-recipes.git
45
+ GIT_TAG f014849188bddd01b9ca3ddf63dde8d2e3a45314
46
+ )
47
+ FetchContent_MakeAvailable(freexl)
48
+
49
+ if (NOT freexl_FOUND)
50
+ if (freexl_POPULATED)
51
+
52
+ message (STATUS "Compiling freexl dependency" )
53
+ execute_process (
54
+ COMMAND_ECHO STDOUT
55
+ WORKING_DIRECTORY ${freexl_SOURCE_DIR} /freexl
56
+ COMMAND
57
+ conan create . --version =${FREEXL_VERSION}
58
+ -s build_type =${CMAKE_BUILD_TYPE}
59
+ -c tools.cmake.cmaketoolchain:generator=${CMAKE_GENERATOR}
60
+ -s compiler.runtime=${CONAN_COMPILER_RUNTIME} --build =missing
61
+ #--test-missing
62
+ )
63
+ else ()
64
+ message (CHECK_FAIL "build freexl failed" )
65
+ endif ()
66
+ endif ()
39
67
40
68
elseif (APPLE )
41
69
@@ -49,7 +77,7 @@ if(USE_CONAN)
49
77
COMMAND
50
78
conan install ${CONAN_FILE_PATH} -s build_type =${CMAKE_BUILD_TYPE} -s
51
79
os.version =${CMAKE_OSX_DEPLOYMENT_TARGET} -s
52
- arch=${CONAN_ARCH} -s arch_build=${CONAN_ARCH} --build =missing -of ${CMAKE_BINARY_DIR} /conan_build )
80
+ arch=${CONAN_ARCH} -s arch_build=${CONAN_ARCH} --build =missing -of ${CMAKE_BINARY_DIR} /_conan_build )
53
81
54
82
else ()
55
83
@@ -59,13 +87,13 @@ if(USE_CONAN)
59
87
COMMAND
60
88
conan install ${CONAN_FILE_PATH} -s build_type =${CMAKE_BUILD_TYPE} -s
61
89
os.version =${CMAKE_OSX_DEPLOYMENT_TARGET}
62
- --build =missing -of ${CMAKE_BINARY_DIR} /conan_build )
90
+ --build =missing -of ${CMAKE_BINARY_DIR} /_conan_build )
63
91
64
92
endif ()
65
93
66
94
endif ()
67
95
68
- if (EXISTS ${CMAKE_BINARY_DIR} /conan_build /${CONAN_RESULT_FILE} )
96
+ if (EXISTS ${CMAKE_BINARY_DIR} /_conan_build /${CONAN_RESULT_FILE} )
69
97
message (CHECK_PASS "successful" )
70
98
else ()
71
99
message (CHECK_FAIL "unsuccessful" )
@@ -75,7 +103,8 @@ if(USE_CONAN)
75
103
)
76
104
endif ()
77
105
78
- include (${CMAKE_BINARY_DIR} /conan_build/conan_toolchain.cmake)
106
+ include (${CMAKE_BINARY_DIR} /_conan_build/conan_toolchain.cmake)
107
+ include (${freexl_SOURCE_DIR} /freexl/test_package/build /msvc -194-x86_64-17-${CMAKE_BUILD_TYPE} /generators/conan_toolchain.cmake)
79
108
80
109
endif ()
81
110
0 commit comments