ソースを参照

Fix installation directory of CMake config files

Without this fix if one installed open62541 in the default CMAKE_INSTALL_PREFIX, or in a custom prefix that was added to CMAKE_PREFIX_PATH, `find_package(open62541 REQUIRED)` would still fail. 

This is because the CMake config file was not installed in one of the many directory check by the find_package CMake command: 
https://cmake.org/cmake/help/v3.8/command/find_package.html . 

Before this fix, the only way of actually finding the open62541 CMake package was to directly point open62541_DIR or CMAKE_PREFIX_PATH to <prefix>/lib/cmake/open62541 .
Silvio Traversaro 6 年 前
コミット
939a8ac5bb
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -913,7 +913,7 @@ add_custom_target(cpplint cpplint
 # specify install location with `-DCMAKE_INSTALL_PREFIX=xyz`
 # Enable shared library with `-DBUILD_SHARED_LIBS=ON`
 
-set(cmake_configfile_install ${LIB_INSTALL_DIR}/cmake)
+set(cmake_configfile_install ${LIB_INSTALL_DIR}/cmake/open62541)
 set(target_install_dest_name "${cmake_configfile_install}/open62541Targets.cmake")
 set(open62541_tools_dir share/open62541/tools)
 set(open62541_deps_dir include/open62541/deps)