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 87e0158 commit 76259f3
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ execute_process(
)
message(STATUS "Finished get_deps.py")

if (WIN32)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
elseif (LINUX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
elseif (APPLE)
# if(${APNGASM_COMPILE_TARGET} STREQUAL "x86_64")
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
# endif()
endif()

set(ZLIB_USE_STATIC_LIBS ON)
set(PNG_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_LIBS ON)
if (WIN32)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME ON)
endif()

# Add conan packages
if ("${APNGASM_COMPILE_TARGET}" STREQUAL "universal2")
set(CONAN_TOOLCHAIN_1 ${CMAKE_SOURCE_DIR}/conan_output/armv8/conan_toolchain.cmake)
Expand All @@ -46,26 +66,6 @@ else()
endif()
endif()

if (WIN32)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
elseif (LINUX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
elseif (APPLE)
# if(${APNGASM_COMPILE_TARGET} STREQUAL "x86_64")
set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
# endif()
endif()

set(ZLIB_USE_STATIC_LIBS ON)
set(PNG_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_LIBS ON)
if (WIN32)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME ON)
endif()

project(apngasm-python VERSION 1.0.6)
set(PY_VERSION_SUFFIX "")
set(PY_FULL_VERSION ${PROJECT_VERSION}${PY_VERSION_SUFFIX})
Expand Down

0 comments on commit 76259f3

Please sign in to comment.