https://github.com/Kitware/CMake
Revision 9ecee256f85022028f1b46477d0e49cd1dfeb4a4 authored by Brad King on 24 August 2017, 14:50:28 UTC, committed by Brad King on 24 August 2017, 14:56:48 UTC
The change in commit v3.9.0~3^2 (Xcode: Add "outputPaths" to custom
command script build phase, 2017-07-13) was meant to support Xcode 9's
new build system.  However, without matching "inputPaths", Xcode will
not re-run the build phase if its outputs have already been generated.
This broke the old Xcode build system too.

Revert the change for now so at least the old Xcode build system works.
Further investigation will be needed to add proper support for Xcode 9's
new build system.

Fixes: #17178
1 parent 3f17ccc
Raw File
Tip revision: 9ecee256f85022028f1b46477d0e49cd1dfeb4a4 authored by Brad King on 24 August 2017, 14:50:28 UTC
Xcode: Revert addition of "outputPaths" to custom command build phase
Tip revision: 9ecee25
FindJasper.cmake
# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.

#.rst:
# FindJasper
# ----------
#
# Try to find the Jasper JPEG2000 library
#
# Once done this will define
#
# ::
#
#   JASPER_FOUND - system has Jasper
#   JASPER_INCLUDE_DIR - the Jasper include directory
#   JASPER_LIBRARIES - the libraries needed to use Jasper
#   JASPER_VERSION_STRING - the version of Jasper found (since CMake 2.8.8)

find_path(JASPER_INCLUDE_DIR jasper/jasper.h)

if (NOT JASPER_LIBRARIES)
    find_package(JPEG)

    find_library(JASPER_LIBRARY_RELEASE NAMES jasper libjasper)
    find_library(JASPER_LIBRARY_DEBUG NAMES jasperd)

    include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
    SELECT_LIBRARY_CONFIGURATIONS(JASPER)
endif ()

if (JASPER_INCLUDE_DIR AND EXISTS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h")
    file(STRINGS "${JASPER_INCLUDE_DIR}/jasper/jas_config.h" jasper_version_str REGEX "^#define[\t ]+JAS_VERSION[\t ]+\".*\".*")

    string(REGEX REPLACE "^#define[\t ]+JAS_VERSION[\t ]+\"([^\"]+)\".*" "\\1" JASPER_VERSION_STRING "${jasper_version_str}")
endif ()

include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper
                                  REQUIRED_VARS JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES
                                  VERSION_VAR JASPER_VERSION_STRING)

if (JASPER_FOUND)
   set(JASPER_LIBRARIES ${JASPER_LIBRARIES} ${JPEG_LIBRARIES} )
endif ()

mark_as_advanced(JASPER_INCLUDE_DIR)
back to top