Commit 30d6fdc8 authored by Rashad Kanavath's avatar Rashad Kanavath

SuperBuild: fix jpeg cmake build for osx and msvc

parent 59139271
......@@ -33,11 +33,15 @@ else()
-DWITH_SIMD=FALSE
-DWITH_TURBOJPEG=FALSE
CMAKE_COMMAND ${SB_CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${SB_INSTALL_PREFIX}
PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/patches/${proj}/patch.cmake
)
ExternalProject_Add_Step(${proj} patch_cmake
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/patches/${proj}/patch.cmake
WORKING_DIRECTORY ${JPEG_SB_SRC}
DEPENDEES configure )
if(MSVC)
ExternalProject_Add_Step(${proj} patch_jconfigint
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/${proj}/jconfigint.h.in ${JPEG_SB_SRC}/win/
DEPENDERS configure)
endif()
set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
......
file(READ ${CMAKE_SOURCE_DIR}/CMakeLists.txt cmake_lists_orig1)
string( REPLACE "-DUSE_SETMODE" "" cmake_lists_patch1 ${cmake_lists_orig1})
file(WRITE ${CMAKE_SOURCE_DIR}/CMakeLists.txt "${cmake_lists_patch1}")
FILE(READ ${CMAKE_SOURCE_DIR}/sharedlib/CMakeLists.txt cmake_lists_orig)
file(READ ${CMAKE_SOURCE_DIR}/sharedlib/CMakeLists.txt cmake_lists_orig)
string( REPLACE "-DUSE_SETMODE" "" cmake_lists_patch ${cmake_lists_orig})
file(WRITE ${CMAKE_SOURCE_DIR}/sharedlib/CMakeLists.txt "${cmake_lists_patch}")
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