build_environment: opencolorio 1.1.0
[blender.git] / build_files / build_environment / patches / opencolorio_win.diff
1 diff -Naur external_opencolorio/CMakeLists.txt external_opencolorio.patched/CMakeLists.txt
2 --- external_opencolorio/CMakeLists.txt 2018-01-04 18:38:27 -0700
3 +++ external_opencolorio.patched/CMakeLists.txt 2018-08-15 11:46:53 -0600
4 @@ -251,25 +251,30 @@
5  if(USE_EXTERNAL_YAML)
6      # Set minimum yaml version for non-patched sources.
7      set(YAML_VERSION_MIN "0.3.0")
8 -    include(FindPkgConfig)
9 -    pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp)
10 -    find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h
11 -        HINTS  ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} )
12 -    find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp
13 -        HINTS ${PC_YAML_CPP_LIBRARY_DIRS} )
14 -    set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY})
15 -    set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})
16 -    set(YAML_CPP_VERSION ${PC_YAML_CPP_VERSION})
17 +    if(NOT WIN32)
18 +               include(FindPkgConfig)
19 +               pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp)
20 +               find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h
21 +                       HINTS  ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} )
22 +               find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp
23 +                       HINTS ${PC_YAML_CPP_LIBRARY_DIRS} )
24 +               set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY})
25 +               set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR})
26 +               set(YAML_CPP_VERSION ${PC_YAML_CPP_VERSION})
27  
28 -    if(YAML_CPP_VERSION VERSION_LESS ${YAML_VERSION_MIN})
29 -        message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.")
30 -    endif()
31 -
32 -    find_package_handle_standard_args(yaml-cpp
33 -                                      REQUIRED_VARS YAML_CPP_LIBRARIES YAML_CPP_INCLUDE_DIRS )
34 -    set(YAML_CPP_FOUND ${YAML-CPP_FOUND})
35 -    mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND)
36 +               if(YAML_CPP_VERSION VERSION_LESS ${YAML_VERSION_MIN})
37 +                       message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.")
38 +               endif()
39  
40 +               find_package_handle_standard_args(yaml-cpp
41 +                                                                                 REQUIRED_VARS YAML_CPP_LIBRARIES YAML_CPP_INCLUDE_DIRS )
42 +               set(YAML_CPP_FOUND ${YAML-CPP_FOUND})
43 +               mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND)
44 +       else()
45 +               set(EXTERNAL_INCLUDE_DIRS ${EXTERNAL_INCLUDE_DIRS} ${INC_1})
46 +               set(EXTERNAL_INCLUDE_DIRS ${EXTERNAL_INCLUDE_DIRS} ${INC_2})
47 +               message("INCLUDE DIRS = i:${EXTERNAL_INCLUDE_DIRS} |1:${INC_1} |2:${INC_2}")
48 +       endif()
49      if(YAML_CPP_FOUND)
50          if(YAML_CPP_VERSION VERSION_GREATER "0.5.0")
51              # Need to also get the boost headers here, as yaml-cpp 0.5.0+ requires them.