Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] chore: patch and build freexl locally #5775

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions Tools/CMake/Conan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,37 @@ if(USE_CONAN)
if(WIN32)

message(STATUS " ${CONAN_COMPILER_RUNTIME}")


message(STATUS "Cloning private freexl dependency")
set(FREEXL_VERSION "2.1.0-dev")
FetchContent_Declare(
freexl
GIT_REPOSITORY https://github.com/shun2wang/conan-recipes.git
GIT_TAG f014849188bddd01b9ca3ddf63dde8d2e3a45314
)
FetchContent_MakeAvailable(freexl)
if(freexl_POPULATED)

message(STATUS "Compiling freexl dependency")
execute_process(
COMMAND_ECHO STDOUT
WORKING_DIRECTORY ${freexl_SOURCE_DIR}/freexl
COMMAND
conan create . --version=${FREEXL_VERSION}
-s build_type=${CMAKE_BUILD_TYPE}
-c tools.cmake.cmaketoolchain:generator=${CMAKE_GENERATOR}
-s compiler.runtime=${CONAN_COMPILER_RUNTIME} --build=missing
#--test-missing
)
else()
message(CHECK_FAIL "build freexl failed")
endif()

execute_process(
COMMAND_ECHO STDOUT
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMAND
conan install ${CONAN_FILE_PATH} --output-folder=${CMAKE_BINARY_DIR}/conan_build
conan install ${CONAN_FILE_PATH} --output-folder=${CMAKE_BINARY_DIR}/_conan_build
-s build_type=${CMAKE_BUILD_TYPE}
-s compiler.runtime=${CONAN_COMPILER_RUNTIME} --build=missing)

Expand All @@ -49,7 +74,7 @@ if(USE_CONAN)
COMMAND
conan install ${CONAN_FILE_PATH} -s build_type=${CMAKE_BUILD_TYPE} -s
os.version=${CMAKE_OSX_DEPLOYMENT_TARGET} -s
arch=${CONAN_ARCH} -s arch_build=${CONAN_ARCH} --build=missing -of ${CMAKE_BINARY_DIR}/conan_build)
arch=${CONAN_ARCH} -s arch_build=${CONAN_ARCH} --build=missing -of ${CMAKE_BINARY_DIR}/_conan_build)

else()

Expand All @@ -59,13 +84,13 @@ if(USE_CONAN)
COMMAND
conan install ${CONAN_FILE_PATH} -s build_type=${CMAKE_BUILD_TYPE} -s
os.version=${CMAKE_OSX_DEPLOYMENT_TARGET}
--build=missing -of ${CMAKE_BINARY_DIR}/conan_build)
--build=missing -of ${CMAKE_BINARY_DIR}/_conan_build)

endif()

endif()

if(EXISTS ${CMAKE_BINARY_DIR}/conan_build/${CONAN_RESULT_FILE})
if(EXISTS ${CMAKE_BINARY_DIR}/_conan_build/${CONAN_RESULT_FILE})
message(CHECK_PASS "successful")
else()
message(CHECK_FAIL "unsuccessful")
Expand All @@ -75,7 +100,8 @@ if(USE_CONAN)
)
endif()

include(${CMAKE_BINARY_DIR}/conan_build/conan_toolchain.cmake)
include(${CMAKE_BINARY_DIR}/_conan_build/conan_toolchain.cmake)
include(${freexl_SOURCE_DIR}/freexl/test_package/build/msvc-194-x86_64-17-${CMAKE_BUILD_TYPE}/generators/conan_toolchain.cmake)

endif()

Expand Down
Loading