From 3f56b561f63bb65686bd5ea3d88b0e818ae4cd8a Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 2 Mar 2018 01:04:21 +0000 Subject: [PATCH] fix build with empty prefix sabotage linux uses an empty prefix, i.e. there's no /usr. stuff like /include is directly in the root dir. i run cmake like `cmake -DCMAKE_INSTALL_PREFIX=` which usually works everywhere flawlessly, but i got the following build error here: ``` CMake Error at src/jsonrpccpp/CMakeLists.txt:228 (get_filename_component): get_filename_component called with incorrect number of arguments ``` the cause was omitted quoting of the prefix variable. --- src/jsonrpccpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsonrpccpp/CMakeLists.txt b/src/jsonrpccpp/CMakeLists.txt index f9a152a4..04e82e22 100644 --- a/src/jsonrpccpp/CMakeLists.txt +++ b/src/jsonrpccpp/CMakeLists.txt @@ -225,7 +225,7 @@ install(TARGETS ${ALL_LIBS} EXPORT libjson-rpc-cppTargets ) #set pkg-config -get_filename_component(FULL_PATH_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} ABSOLUTE) +get_filename_component(FULL_PATH_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" ABSOLUTE) set(FULL_PATH_INCLUDEDIR "${FULL_PATH_INSTALL_PREFIX}/include") set(FULL_PATH_LIBDIR "${FULL_PATH_INSTALL_PREFIX}/lib/${CMAKE_LIBRARY_PATH}")