Hi,

Now that THIRD_PARTY_TOOLS_HOME has been removed (see
https://github.com/OpenImageIO/oiio/pull/1604), what should we be using in
its place?  CMAKE_PREFIX_PATH seems like it could be an alternative, but I
think it expects a different directory structure.  I was able to get that
to work by hacking back in some of the removed code (see below), but I'm
curious what the intended way might be.

# Add all third party tool directories to the include and library paths so
# that they'll be correctly found by the various FIND_PACKAGE() invocations.
if (CMAKE_PREFIX_PATH AND EXISTS "${CMAKE_PREFIX_PATH}")
    # Detect third party tools which have been successfully built using the
    # lock files which are placed there by the external project Makefile.
    file (GLOB _external_dir_lockfiles "${CMAKE_PREFIX_PATH}/*.d")
    foreach (_dir_lockfile ${_external_dir_lockfiles})
        # Grab the tool directory_name.d
        get_filename_component (_ext_dirname ${_dir_lockfile} NAME)
        # Strip off the .d extension
        string (REGEX REPLACE "\\.d$" "" _ext_dirname ${_ext_dirname})
        set (CMAKE_INCLUDE_PATH
"${CMAKE_PREFIX_PATH}/include/${_ext_dirname}" ${CMAKE_INCLUDE_PATH})
        set (CMAKE_LIBRARY_PATH "${CMAKE_PREFIX_PATH}/lib/${_ext_dirname}"
${CMAKE_LIBRARY_PATH})
    endforeach ()
endif ()
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to