Multiarch installation fix (#567)

* fix multiarch install

* fix include dir

* cleaned up stuff and removed things we don't need anymore
This commit is contained in:
Evgeniy Fominov 2017-05-01 18:31:36 +03:00 committed by Davis E. King
parent 5fa4533b9a
commit 09b4dc82b4
2 changed files with 6 additions and 13 deletions

View File

@ -749,7 +749,6 @@ if (NOT TARGET dlib)
NAMESPACE dlib::
DESTINATION ${ConfigPackageLocation})
set(CONF_INSTALL_PATH "\${dlib_CMAKE_DIR}/../../../")
configure_file(cmake_utils/dlibConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/config/dlibConfig.cmake" @ONLY)
include(CMakePackageConfigHelpers)

View File

@ -19,24 +19,18 @@
# ===================================================================================
# Compute paths
get_filename_component(dlib_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 2.8)
get_filename_component(dlib_INSTALL_PATH "@CONF_INSTALL_PATH@" ABSOLUTE)
else()
get_filename_component(dlib_INSTALL_PATH "@CONF_INSTALL_PATH@" REALPATH)
endif()
set(dlib_INCLUDE_DIRS "${dlib_INSTALL_PATH}/include" "@dlib_needed_includes@")
# Our library dependencies (contains definitions for IMPORTED targets)
if(NOT TARGET dlib-shared AND NOT dlib_BINARY_DIR)
include("${dlib_CMAKE_DIR}/dlib.cmake")
# Compute paths
get_filename_component(dlib_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include("${dlib_CMAKE_DIR}/dlib.cmake")
endif()
find_library(dlib_LIBRARIES dlib HINTS ${dlib_INSTALL_PATH}/lib)
find_library(dlib_LIBRARIES dlib HINTS "@CMAKE_INSTALL_FULL_LIBDIR@")
set(dlib_LIBRARIES ${dlib_LIBRARIES} "@dlib_needed_libraries@")
set(dlib_LIBS ${dlib_LIBRARIES} "@dlib_needed_libraries@")
set(dlib_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@" "@dlib_needed_includes@")
include(${dlib_INSTALL_PATH}/include/dlib/cmake_utils/use_cpp_11.cmake)
include(@CMAKE_INSTALL_FULL_INCLUDEDIR@/dlib/cmake_utils/use_cpp_11.cmake)