Make relative path variables of type STRING
When the type is PATH an absolute path is expected and user-defined
values are converted into absolute paths relative to the current directory.
Fixes #1990
(cherry picked from commit a967fadb21)
			
			
This commit is contained in:
		
							parent
							
								
									a796be81a4
								
							
						
					
					
						commit
						1b080fdcb9
					
				| @ -391,22 +391,27 @@ endif() | ||||
| 
 | ||||
| if(EIGEN_INCLUDE_INSTALL_DIR AND NOT INCLUDE_INSTALL_DIR) | ||||
|   set(INCLUDE_INSTALL_DIR ${EIGEN_INCLUDE_INSTALL_DIR} | ||||
|       CACHE PATH "The directory relative to CMAKE_PREFIX_PATH where Eigen header files are installed") | ||||
|       CACHE STRING "The directory relative to CMAKE_PREFIX_PATH where Eigen header files are installed") | ||||
| else() | ||||
|   set(INCLUDE_INSTALL_DIR | ||||
|       "${CMAKE_INSTALL_INCLUDEDIR}/eigen3" | ||||
|       CACHE PATH "The directory relative to CMAKE_PREFIX_PATH where Eigen header files are installed" | ||||
|       CACHE STRING "The directory relative to CMAKE_PREFIX_PATH where Eigen header files are installed" | ||||
|       ) | ||||
| endif() | ||||
| set(CMAKEPACKAGE_INSTALL_DIR | ||||
|     "${CMAKE_INSTALL_DATADIR}/eigen3/cmake" | ||||
|     CACHE PATH "The directory relative to CMAKE_PREFIX_PATH where Eigen3Config.cmake is installed" | ||||
|     CACHE STRING "The directory relative to CMAKE_PREFIX_PATH where Eigen3Config.cmake is installed" | ||||
|     ) | ||||
| set(PKGCONFIG_INSTALL_DIR | ||||
|     "${CMAKE_INSTALL_DATADIR}/pkgconfig" | ||||
|     CACHE PATH "The directory relative to CMAKE_PREFIX_PATH where eigen3.pc is installed" | ||||
|     CACHE STRING "The directory relative to CMAKE_PREFIX_PATH where eigen3.pc is installed" | ||||
|     ) | ||||
| 
 | ||||
| foreach(var INCLUDE_INSTALL_DIR CMAKEPACKAGE_INSTALL_DIR PKGCONFIG_INSTALL_DIR) | ||||
|   if(IS_ABSOLUTE "${${var}}") | ||||
|     message(FATAL_ERROR "${var} must be relative to CMAKE_PREFIX_PATH. Got: ${${var}}") | ||||
|   endif() | ||||
| endforeach() | ||||
| 
 | ||||
| # similar to set_target_properties but append the property instead of overwriting it | ||||
| macro(ei_add_target_property target prop value) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Alexander Grund
						Alexander Grund