Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Sep 9, 2023
1 parent 21e54a2 commit 87e0158
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,30 @@ execute_process(
)
message(STATUS "Finished get_deps.py")

# Add conan packages
if ("${APNGASM_COMPILE_TARGET}" STREQUAL "universal2")
set(CONAN_TOOLCHAIN_1 ${CMAKE_SOURCE_DIR}/conan_output/armv8/conan_toolchain.cmake)
if (EXISTS ${CONAN_TOOLCHAIN_1})
include(${CONAN_TOOLCHAIN_1})
else()
message(WARNING "The conan_toolchain file could not be found: ${CONAN_TOOLCHAIN_1}")
endif()

set(CONAN_TOOLCHAIN_2 ${CMAKE_SOURCE_DIR}/conan_output/x86_64/conan_toolchain.cmake)
if (EXISTS ${CONAN_TOOLCHAIN_2})
include(${CONAN_TOOLCHAIN_2})
else()
message(WARNING "The conan_toolchain file could not be found: ${CONAN_TOOLCHAIN_2}")
endif()
else()
set(CONAN_TOOLCHAIN ${CMAKE_SOURCE_DIR}/conan_output/${APNGASM_COMPILE_TARGET}/conan_toolchain.cmake)
if (EXISTS ${CONAN_TOOLCHAIN})
include(${CONAN_TOOLCHAIN})
else()
message(WARNING "The conan_toolchain file could not be found: ${CONAN_TOOLCHAIN}")
endif()
endif()

if (WIN32)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
Expand Down Expand Up @@ -58,30 +82,6 @@ endif()
include(cmake/QueryPythonForNanobind.cmake)
find_nanobind_python_first()

# Add conan packages
if ("${APNGASM_COMPILE_TARGET}" STREQUAL "universal2")
set(CONAN_TOOLCHAIN_1 ${CMAKE_SOURCE_DIR}/conan_output/x86_64/conan_toolchain.cmake)
if (EXISTS ${CONAN_TOOLCHAIN_1})
include(${CONAN_TOOLCHAIN_1})
else()
message(WARNING "The conan_toolchain file could not be found: ${CONAN_TOOLCHAIN_1}")
endif()

set(CONAN_TOOLCHAIN_2 ${CMAKE_SOURCE_DIR}/conan_output/armv8/conan_toolchain.cmake)
if (EXISTS ${CONAN_TOOLCHAIN_2})
include(${CONAN_TOOLCHAIN_2})
else()
message(WARNING "The conan_toolchain file could not be found: ${CONAN_TOOLCHAIN_1}")
endif()
else()
set(CONAN_TOOLCHAIN ${CMAKE_SOURCE_DIR}/conan_output/${APNGASM_COMPILE_TARGET}/conan_toolchain.cmake)
if (EXISTS ${CONAN_TOOLCHAIN})
include(${CONAN_TOOLCHAIN})
else()
message(WARNING "The conan_toolchain file could not be found: ${CONAN_TOOLCHAIN}")
endif()
endif()

# Compile the Python module
nanobind_add_module(_apngasm_python "src/apngasm_python.cpp" NB_STATIC STABLE_ABI)
if (WIN32)
Expand Down

0 comments on commit 87e0158

Please sign in to comment.