Commit d4da2a48 authored by jehan's avatar jehan
Browse files

Merge branch 'fix/limit_cmake_workaround' into 'bc'

re-use cmake NASM invocation for non bugged version

See merge request !7
parents c25c18ab b8b29a98
......@@ -31,8 +31,14 @@ project(libjpeg-turbo LANGUAGES C)
set(VERSION 2.0.5)
set(PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
# Cmake's nasm support is almost crappy.
set(USE_OWN_NASM_INVOCATION 1)
# Cmake's nasm support for version 3.19.0 and 3.19.1 is bugged https://gitlab.kitware.com/cmake/cmake/-/issues/21553 .
if (MSVC_IDE OR XCODE OR (CMAKE_VERSION VERSION_LESS 3.19.2 AND CMAKE_VERSION VERSION_GREATER 3.19.0))
set(USE_OWN_NASM_INVOCATION 1)
message(STATUS "Not using CMake's NASM integration")
else()
set(USE_OWN_NASM_INVOCATION 0)
message(STATUS "Using CMake's NASM integration")
endif()
string(REPLACE "." ";" VERSION_TRIPLET ${VERSION})
list(GET VERSION_TRIPLET 0 VERSION_MAJOR)
......
......@@ -140,7 +140,7 @@ if(MSVC_IDE)
set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
string(REGEX REPLACE " " ";" CMAKE_ASM_NASM_FLAGS "${CMAKE_ASM_NASM_FLAGS}")
#elseif(XCODE)
else()
elseif(USE_OWN_NASM_INVOCATION)
set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}")
string(REGEX REPLACE " " ";" CMAKE_ASM_NASM_FLAGS "${CMAKE_ASM_NASM_FLAGS}")
endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment