Convert obsolete uses of get_filename_component(<var> <FileName> PATH)
In the context of get_filename_component(), PATH is a legacy alias for DIRECTORY. Replace it with DIRECTORY, which is recommended[1] for CMake versions > 2.8.11. [1] https://cmake.org/cmake/help/latest/command/get_filename_component.html
This commit is contained in:
parent
b2d6acdd4d
commit
63f6d0b5bf
2 changed files with 5 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
# ConfigureMsvc3rdParty.cmake - Configure 3rd Party Library Paths on Windows
|
# ConfigureMsvc3rdParty.cmake - Configure 3rd Party Library Paths on Windows
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
GET_FILENAME_COMPONENT(PARENT_DIR ${PROJECT_BINARY_DIR} PATH)
|
get_filename_component(PARENT_DIR ${PROJECT_BINARY_DIR} DIRECTORY)
|
||||||
if (CMAKE_CL_64)
|
if (CMAKE_CL_64)
|
||||||
SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdparty.x64")
|
SET(TEST_3RDPARTY_DIR "${PARENT_DIR}/3rdparty.x64")
|
||||||
else (CMAKE_CL_64)
|
else (CMAKE_CL_64)
|
||||||
|
@ -52,7 +52,8 @@ if (MSVC AND MSVC_3RDPARTY_ROOT)
|
||||||
# if this variable was not set by the user, set it to 3rdparty root's
|
# if this variable was not set by the user, set it to 3rdparty root's
|
||||||
# parent dir, which is the normal location for people using our
|
# parent dir, which is the normal location for people using our
|
||||||
# windows-3rd-party repo
|
# windows-3rd-party repo
|
||||||
GET_FILENAME_COMPONENT(MSVC_ROOT_PARENT_DIR ${MSVC_3RDPARTY_ROOT} PATH)
|
get_filename_component(MSVC_ROOT_PARENT_DIR ${MSVC_3RDPARTY_ROOT}
|
||||||
|
DIRECTORY)
|
||||||
set(BOOST_INCLUDEDIR ${MSVC_ROOT_PARENT_DIR})
|
set(BOOST_INCLUDEDIR ${MSVC_ROOT_PARENT_DIR})
|
||||||
message(STATUS "BOOST_INCLUDEDIR is ${BOOST_INCLUDEDIR}")
|
message(STATUS "BOOST_INCLUDEDIR is ${BOOST_INCLUDEDIR}")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -43,7 +43,7 @@ FIND_PATH(DBUS_INCLUDE_DIR
|
||||||
${PC_DBUS_INCLUDE_DIRS}
|
${PC_DBUS_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
GET_FILENAME_COMPONENT(_DBUS_LIBRARY_DIR ${DBUS_LIBRARIES} PATH)
|
GET_FILENAME_COMPONENT(_DBUS_LIBRARY_DIR ${DBUS_LIBRARIES} DIRECTORY)
|
||||||
FIND_PATH(DBUS_ARCH_INCLUDE_DIR
|
FIND_PATH(DBUS_ARCH_INCLUDE_DIR
|
||||||
NAMES dbus/dbus-arch-deps.h
|
NAMES dbus/dbus-arch-deps.h
|
||||||
HINTS ${PC_DBUS_INCLUDEDIR}
|
HINTS ${PC_DBUS_INCLUDEDIR}
|
||||||
|
@ -56,4 +56,4 @@ FIND_PATH(DBUS_ARCH_INCLUDE_DIR
|
||||||
SET(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
|
SET(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})
|
||||||
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES)
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBUS REQUIRED_VARS DBUS_INCLUDE_DIRS DBUS_LIBRARIES)
|
||||||
|
|
Loading…
Add table
Reference in a new issue