1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0027365: Configuration, CMake - file writing error appears if 3RDPARTY_DIR is empty

3RDPARTY_DIR and INSTALL_DIR are quoted in a file TO_CMAKE_PATH command to avoid error when variable is empty
This commit is contained in:
ibs 2016-04-07 23:38:03 +03:00 committed by abv
parent 84258256c0
commit 1d505bb0f8

View File

@ -75,7 +75,7 @@ if (NOT DEFINED INSTALL_DIR)
endif()
set (INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "${INSTALL_DIR_DESCR}")
else()
file (TO_CMAKE_PATH ${INSTALL_DIR} INSTALL_DIR)
file (TO_CMAKE_PATH "${INSTALL_DIR}" INSTALL_DIR)
set (INSTALL_DIR "${INSTALL_DIR}" CACHE PATH "${INSTALL_DIR_DESCR}" FORCE)
endif()
@ -381,7 +381,7 @@ if (NOT DEFINED 3RDPARTY_DIR)
set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_DESCR})
get_filename_component (3RDPARTY_DIR "${3RDPARTY_DIR}" ABSOLUTE)
else()
file (TO_CMAKE_PATH ${3RDPARTY_DIR} 3RDPARTY_DIR)
file (TO_CMAKE_PATH "${3RDPARTY_DIR}" 3RDPARTY_DIR)
set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH "${3RDPARTY_DIR_DESCR}" FORCE)
endif()