From 25b7dca46b4254f285c6a80ece9dd5fc45a81fed Mon Sep 17 00:00:00 2001 From: Gold856 <117957790+Gold856@users.noreply.github.com> Date: Tue, 21 Nov 2023 14:48:32 -0500 Subject: [PATCH] [build] Remove CMake flat install option (#5944) --- CMakeLists.txt | 25 +------------------------ apriltag/CMakeLists.txt | 9 ++------- cameraserver/CMakeLists.txt | 10 ++-------- cscore/CMakeLists.txt | 10 ++-------- glass/CMakeLists.txt | 10 ---------- hal/CMakeLists.txt | 10 ++-------- ntcore/CMakeLists.txt | 10 ++-------- romiVendordep/CMakeLists.txt | 18 +++--------------- wpigui/CMakeLists.txt | 10 ---------- wpilibNewCommands/CMakeLists.txt | 18 +++--------------- wpilibc/CMakeLists.txt | 10 ++-------- wpilibj/CMakeLists.txt | 8 +------- wpimath/CMakeLists.txt | 10 ++-------- wpinet/CMakeLists.txt | 10 ++-------- wpiunits/CMakeLists.txt | 8 +------- wpiutil/CMakeLists.txt | 10 ++-------- xrpVendordep/CMakeLists.txt | 18 +++--------------- 17 files changed, 30 insertions(+), 174 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3929280c997..e10ad6135a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,9 +76,6 @@ option(USE_SYSTEM_FMTLIB "Use system fmtlib" OFF) option(USE_SYSTEM_LIBUV "Use system libuv" OFF) option(USE_SYSTEM_EIGEN "Use system eigen" OFF) -# Options for installation. -option(WITH_FLAT_INSTALL "Use a flat install directory" OFF) - # Options for location of OpenCV Java. set(OPENCV_JAVA_INSTALL_DIR "" CACHE PATH "Location to search for the OpenCV jar file") @@ -162,17 +159,10 @@ FATAL: Cannot build Java wpimath without wpiunits. ") endif() -set( wpilib_dest "") set( include_dest include ) set( java_lib_dest java ) set( jni_lib_dest jni ) -if (WITH_FLAT_INSTALL) - set (wpilib_config_dir ${wpilib_dest}) -else() - set (wpilib_config_dir share/wpilib) -endif() - if (USE_SYSTEM_LIBUV) set (LIBUV_SYSTEM_REPLACE " find_dependency(libuv CONFIG) @@ -191,18 +181,6 @@ find_program(Quickbuf_EXECUTABLE DOC "The Quickbuf protoc plugin" ) -if (WITH_FLAT_INSTALL) -set(WPIUTIL_DEP_REPLACE "include($\{SELF_DIR\}/wpiutil-config.cmake)") -set(WPINET_DEP_REPLACE "include($\{SELF_DIR\}/wpinet-config.cmake)") -set(NTCORE_DEP_REPLACE "include($\{SELF_DIR\}/ntcore-config.cmake)") -set(CSCORE_DEP_REPLACE_IMPL "include(\${SELF_DIR}/cscore-config.cmake)") -set(CAMERASERVER_DEP_REPLACE_IMPL "include(\${SELF_DIR}/cameraserver-config.cmake)") -set(HAL_DEP_REPLACE_IMPL "include(\${SELF_DIR}/hal-config.cmake)") -set(WPIMATH_DEP_REPLACE "include($\{SELF_DIR\}/wpimath-config.cmake)") -set(WPIUNITS_DEP_REPLACE "include($\{SELF_DIR\}/wpiunits-config.cmake)") -set(WPILIBC_DEP_REPLACE_IMPL "include(\${SELF_DIR}/wpilibc-config.cmake)") -set(WPILIBNEWCOMMANDS_DEP_REPLACE "include(\${SELF_DIR}/wpilibNewcommands-config.cmake)") -else() set(WPIUTIL_DEP_REPLACE "find_dependency(wpiutil)") set(WPINET_DEP_REPLACE "find_dependency(wpinet)") set(NTCORE_DEP_REPLACE "find_dependency(ntcore)") @@ -213,7 +191,6 @@ set(WPIMATH_DEP_REPLACE "find_dependency(wpimath)") set(WPIUNITS_DEP_REPLACE "find_dependency(wpiunits)") set(WPILIBC_DEP_REPLACE_IMPL "find_dependency(wpilibc)") set(WPILIBNEWCOMMANDS_DEP_REPLACE "find_dependency(wpilibNewCommands)") -endif() set(FILENAME_DEP_REPLACE "get_filename_component(SELF_DIR \"$\{CMAKE_CURRENT_LIST_FILE\}\" PATH)") set(SELF_DIR "$\{SELF_DIR\}") @@ -356,4 +333,4 @@ if (WITH_SIMULATION_MODULES AND NOT WITH_EXTERNAL_HAL) endif() configure_file(wpilib-config.cmake.in ${WPILIB_BINARY_DIR}/wpilib-config.cmake ) -install(FILES ${WPILIB_BINARY_DIR}/wpilib-config.cmake DESTINATION ${wpilib_config_dir}) +install(FILES ${WPILIB_BINARY_DIR}/wpilib-config.cmake DESTINATION share/wpilib) diff --git a/apriltag/CMakeLists.txt b/apriltag/CMakeLists.txt index e86c47f5ed5..984c5026871 100644 --- a/apriltag/CMakeLists.txt +++ b/apriltag/CMakeLists.txt @@ -108,15 +108,10 @@ target_include_directories(apriltag PUBLIC install(TARGETS apriltag EXPORT apriltag) install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/apriltag") -if (WITH_FLAT_INSTALL) - set (apriltag_config_dir ${wpilib_dest}) -else() - set (apriltag_config_dir share/apriltag) -endif() configure_file(apriltag-config.cmake.in ${WPILIB_BINARY_DIR}/apriltag-config.cmake ) -install(FILES ${WPILIB_BINARY_DIR}/apriltag-config.cmake DESTINATION ${apriltag_config_dir}) -install(EXPORT apriltag DESTINATION ${apriltag_config_dir}) +install(FILES ${WPILIB_BINARY_DIR}/apriltag-config.cmake DESTINATION share/apriltag) +install(EXPORT apriltag DESTINATION share/apriltag) if (WITH_TESTS) wpilib_add_test(apriltag src/test/native/cpp) diff --git a/cameraserver/CMakeLists.txt b/cameraserver/CMakeLists.txt index 177e009eef9..c2e2bd5f76d 100644 --- a/cameraserver/CMakeLists.txt +++ b/cameraserver/CMakeLists.txt @@ -59,15 +59,9 @@ set_property(TARGET cameraserver PROPERTY FOLDER "libraries") install(TARGETS cameraserver EXPORT cameraserver) install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/cameraserver") -if (WITH_FLAT_INSTALL) - set (cameraserver_config_dir ${wpilib_dest}) -else() - set (cameraserver_config_dir share/cameraserver) -endif() - configure_file(cameraserver-config.cmake.in ${WPILIB_BINARY_DIR}/cameraserver-config.cmake ) -install(FILES ${WPILIB_BINARY_DIR}/cameraserver-config.cmake DESTINATION ${cameraserver_config_dir}) -install(EXPORT cameraserver DESTINATION ${cameraserver_config_dir}) +install(FILES ${WPILIB_BINARY_DIR}/cameraserver-config.cmake DESTINATION share/cameraserver) +install(EXPORT cameraserver DESTINATION share/cameraserver) file(GLOB multiCameraServer_src multiCameraServer/src/main/native/cpp/*.cpp) add_executable(multiCameraServer ${multiCameraServer_src}) diff --git a/cscore/CMakeLists.txt b/cscore/CMakeLists.txt index a6a89b36352..e19579caa0f 100644 --- a/cscore/CMakeLists.txt +++ b/cscore/CMakeLists.txt @@ -43,15 +43,9 @@ set_property(TARGET cscore PROPERTY FOLDER "libraries") install(TARGETS cscore EXPORT cscore) install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/cscore") -if (WITH_FLAT_INSTALL) - set (cscore_config_dir ${wpilib_dest}) -else() - set (cscore_config_dir share/cscore) -endif() - configure_file(cscore-config.cmake.in ${WPILIB_BINARY_DIR}/cscore-config.cmake ) -install(FILES ${WPILIB_BINARY_DIR}/cscore-config.cmake DESTINATION ${cscore_config_dir}) -install(EXPORT cscore DESTINATION ${cscore_config_dir}) +install(FILES ${WPILIB_BINARY_DIR}/cscore-config.cmake DESTINATION share/cscore) +install(EXPORT cscore DESTINATION share/cscore) subdir_list(cscore_examples "${CMAKE_CURRENT_SOURCE_DIR}/examples") foreach(example ${cscore_examples}) diff --git a/glass/CMakeLists.txt b/glass/CMakeLists.txt index b949fc00fe5..e71b407e6ff 100644 --- a/glass/CMakeLists.txt +++ b/glass/CMakeLists.txt @@ -73,13 +73,3 @@ if (WIN32) elseif(APPLE) set_target_properties(glass PROPERTIES MACOSX_BUNDLE YES OUTPUT_NAME "Glass") endif() - -#if (MSVC OR FLAT_INSTALL_WPILIB) -# set (wpigui_config_dir ${wpilib_dest}) -#else() -# set (wpigui_config_dir share/wpigui) -#endif() - -#configure_file(wpigui-config.cmake.in ${CMAKE_BINARY_DIR}/wpigui-config.cmake ) -#install(FILES ${CMAKE_BINARY_DIR}/wpigui-config.cmake DESTINATION ${wpigui_config_dir}) -#install(EXPORT wpigui DESTINATION ${wpigui_config_dir}) diff --git a/hal/CMakeLists.txt b/hal/CMakeLists.txt index 603190b2421..39c018a6c15 100644 --- a/hal/CMakeLists.txt +++ b/hal/CMakeLists.txt @@ -59,15 +59,9 @@ install(TARGETS hal EXPORT hal) install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/hal") install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gen/ DESTINATION "${include_dest}/hal") -if (WITH_FLAT_INSTALL) - set (hal_config_dir ${wpilib_dest}) -else() - set (hal_config_dir share/hal) -endif() - configure_file(hal-config.cmake.in ${WPILIB_BINARY_DIR}/hal-config.cmake ) -install(FILES ${WPILIB_BINARY_DIR}/hal-config.cmake DESTINATION ${hal_config_dir}) -install(EXPORT hal DESTINATION ${hal_config_dir}) +install(FILES ${WPILIB_BINARY_DIR}/hal-config.cmake DESTINATION share/hal) +install(EXPORT hal DESTINATION share/hal) # Java bindings if (WITH_JAVA) diff --git a/ntcore/CMakeLists.txt b/ntcore/CMakeLists.txt index 5216eda5227..141613bcd69 100644 --- a/ntcore/CMakeLists.txt +++ b/ntcore/CMakeLists.txt @@ -37,15 +37,9 @@ install(TARGETS ntcore EXPORT ntcore) install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/ntcore") install(DIRECTORY ${WPILIB_BINARY_DIR}/ntcore/generated/main/native/include/ DESTINATION "${include_dest}/ntcore") -if (WITH_FLAT_INSTALL) - set (ntcore_config_dir ${wpilib_dest}) -else() - set (ntcore_config_dir share/ntcore) -endif() - configure_file(ntcore-config.cmake.in ${WPILIB_BINARY_DIR}/ntcore-config.cmake ) -install(FILES ${WPILIB_BINARY_DIR}/ntcore-config.cmake DESTINATION ${ntcore_config_dir}) -install(EXPORT ntcore DESTINATION ${ntcore_config_dir}) +install(FILES ${WPILIB_BINARY_DIR}/ntcore-config.cmake DESTINATION share/ntcore) +install(EXPORT ntcore DESTINATION share/ntcore) # Java bindings if (WITH_JAVA) diff --git a/romiVendordep/CMakeLists.txt b/romiVendordep/CMakeLists.txt index 72b55c815b3..0a5323b843c 100644 --- a/romiVendordep/CMakeLists.txt +++ b/romiVendordep/CMakeLists.txt @@ -16,12 +16,6 @@ if (WITH_JAVA) install(FILES ${ROMIVENDORDEP_JAR_FILE} DESTINATION "${java_lib_dest}") set_property(TARGET romiVendordep_jar PROPERTY FOLDER "java") - - if (WITH_FLAT_INSTALL) - set (romiVendordep_config_dir ${wpilib_dest}) - else() - set (romiVendordep_config_dir share/romiVendordep) - endif() endif() if (WITH_JAVA_SOURCE) @@ -54,15 +48,9 @@ target_include_directories(romiVendordep PUBLIC install(TARGETS romiVendordep EXPORT romiVendordep DESTINATION "${main_lib_dest}") install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/romiVendordep") -if (FLAT_INSTALL_WPILIB) - set(romiVendordep_config_dir ${wpilib_dest}) - else() - set(romiVendordep_config_dir share/romiVendordep) - endif() - - configure_file(romiVendordep-config.cmake.in ${WPILIB_BINARY_DIR}/romiVendordep-config.cmake) - install(FILES ${WPILIB_BINARY_DIR}/romiVendordep-config.cmake DESTINATION ${romiVendordep_config_dir}) - install(EXPORT romiVendordep DESTINATION ${romiVendordep_config_dir}) +configure_file(romiVendordep-config.cmake.in ${WPILIB_BINARY_DIR}/romiVendordep-config.cmake) +install(FILES ${WPILIB_BINARY_DIR}/romiVendordep-config.cmake DESTINATION share/romiVendordep) +install(EXPORT romiVendordep DESTINATION share/romiVendordep) if (WITH_TESTS) wpilib_add_test(romiVendordep src/test/native/cpp) diff --git a/wpigui/CMakeLists.txt b/wpigui/CMakeLists.txt index 68acbea643c..4e8b6c3609c 100644 --- a/wpigui/CMakeLists.txt +++ b/wpigui/CMakeLists.txt @@ -44,13 +44,3 @@ target_link_libraries(wpiguidev wpigui) install(TARGETS wpigui EXPORT wpigui) install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/wpigui") - -#if (WITH_FLAT_INSTALL) -# set (wpigui_config_dir ${wpilib_dest}) -#else() -# set (wpigui_config_dir share/wpigui) -#endif() - -#configure_file(wpigui-config.cmake.in ${WPILIB_BINARY_DIR}/wpigui-config.cmake ) -#install(FILES ${WPILIB_BINARY_DIR}/wpigui-config.cmake DESTINATION ${wpigui_config_dir}) -#install(EXPORT wpigui DESTINATION ${wpigui_config_dir}) diff --git a/wpilibNewCommands/CMakeLists.txt b/wpilibNewCommands/CMakeLists.txt index 299b92a861b..5f525bb5bea 100644 --- a/wpilibNewCommands/CMakeLists.txt +++ b/wpilibNewCommands/CMakeLists.txt @@ -16,12 +16,6 @@ if (WITH_JAVA) install(FILES ${WPILIBNEWCOMMANDS_JAR_FILE} DESTINATION "${java_lib_dest}") set_property(TARGET wpilibNewCommands_jar PROPERTY FOLDER "java") - - if (WITH_FLAT_INSTALL) - set (wpilibNewCommands_config_dir ${wpilib_dest}) - else() - set (wpilibNewCommands_config_dir share/wpilibNewCommands) - endif() endif() if (WITH_JAVA_SOURCE) @@ -56,15 +50,9 @@ target_include_directories(wpilibNewCommands PUBLIC install(TARGETS wpilibNewCommands EXPORT wpilibNewCommands) install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/wpilibNewCommands") -if (FLAT_INSTALL_WPILIB) - set(wpilibNewCommands_config_dir ${wpilib_dest}) - else() - set(wpilibNewCommands_config_dir share/wpilibNewCommands) - endif() - - configure_file(wpilibNewCommands-config.cmake.in ${WPILIB_BINARY_DIR}/wpilibNewCommands-config.cmake) - install(FILES ${WPILIB_BINARY_DIR}/wpilibNewCommands-config.cmake DESTINATION ${wpilibNewCommands_config_dir}) - install(EXPORT wpilibNewCommands DESTINATION ${wpilibNewCommands_config_dir}) +configure_file(wpilibNewCommands-config.cmake.in ${WPILIB_BINARY_DIR}/wpilibNewCommands-config.cmake) +install(FILES ${WPILIB_BINARY_DIR}/wpilibNewCommands-config.cmake DESTINATION share/wpilibNewCommands) +install(EXPORT wpilibNewCommands DESTINATION share/wpilibNewCommands) if (WITH_TESTS) wpilib_add_test(wpilibNewCommands src/test/native/cpp) diff --git a/wpilibc/CMakeLists.txt b/wpilibc/CMakeLists.txt index ed8583497c4..fc7b54ea3a9 100644 --- a/wpilibc/CMakeLists.txt +++ b/wpilibc/CMakeLists.txt @@ -33,15 +33,9 @@ set_property(TARGET wpilibc PROPERTY FOLDER "libraries") install(TARGETS wpilibc EXPORT wpilibc) install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/wpilibc") -if (WITH_FLAT_INSTALL) - set (wpilibc_config_dir ${wpilib_dest}) -else() - set (wpilibc_config_dir share/wpilibc) -endif() - configure_file(wpilibc-config.cmake.in ${WPILIB_BINARY_DIR}/wpilibc-config.cmake ) -install(FILES ${WPILIB_BINARY_DIR}/wpilibc-config.cmake DESTINATION ${wpilibc_config_dir}) -install(EXPORT wpilibc DESTINATION ${wpilibc_config_dir}) +install(FILES ${WPILIB_BINARY_DIR}/wpilibc-config.cmake DESTINATION share/wpilibc) +install(EXPORT wpilibc DESTINATION share/wpilibc) if (WITH_TESTS) wpilib_add_test(wpilibc src/test/native/cpp) diff --git a/wpilibj/CMakeLists.txt b/wpilibj/CMakeLists.txt index c2cea44d9a7..a5cd637473e 100644 --- a/wpilibj/CMakeLists.txt +++ b/wpilibj/CMakeLists.txt @@ -24,13 +24,7 @@ if (WITH_JAVA) set_property(TARGET wpilibj_jar PROPERTY FOLDER "java") - if (WITH_FLAT_INSTALL) - set (wpilibj_config_dir ${wpilib_dest}) - else() - set (wpilibj_config_dir share/wpilibj) - endif() - - install(FILES wpilibj-config.cmake DESTINATION ${wpilibj_config_dir}) + install(FILES wpilibj-config.cmake DESTINATION share/wpilibj) endif() if (WITH_JAVA_SOURCE) diff --git a/wpimath/CMakeLists.txt b/wpimath/CMakeLists.txt index bb3f99c37e5..029a9d6571f 100644 --- a/wpimath/CMakeLists.txt +++ b/wpimath/CMakeLists.txt @@ -208,15 +208,9 @@ target_include_directories(wpimath PUBLIC install(TARGETS wpimath EXPORT wpimath) -if (WITH_FLAT_INSTALL) - set (wpimath_config_dir ${wpilib_dest}) -else() - set (wpimath_config_dir share/wpimath) -endif() - configure_file(wpimath-config.cmake.in ${WPILIB_BINARY_DIR}/wpimath-config.cmake ) -install(FILES ${WPILIB_BINARY_DIR}/wpimath-config.cmake DESTINATION ${wpimath_config_dir}) -install(EXPORT wpimath DESTINATION ${wpimath_config_dir}) +install(FILES ${WPILIB_BINARY_DIR}/wpimath-config.cmake DESTINATION share/wpimath) +install(EXPORT wpimath DESTINATION share/wpimath) if (WITH_TESTS) wpilib_add_test(wpimath src/test/native/cpp) diff --git a/wpinet/CMakeLists.txt b/wpinet/CMakeLists.txt index f1eda760e32..9729334a264 100644 --- a/wpinet/CMakeLists.txt +++ b/wpinet/CMakeLists.txt @@ -173,15 +173,9 @@ target_include_directories(wpinet PUBLIC install(TARGETS wpinet EXPORT wpinet) -if (WITH_FLAT_INSTALL) - set (wpinet_config_dir ${wpilib_dest}) -else() - set (wpinet_config_dir share/wpinet) -endif() - configure_file(wpinet-config.cmake.in ${WPILIB_BINARY_DIR}/wpinet-config.cmake ) -install(FILES ${WPILIB_BINARY_DIR}/wpinet-config.cmake DESTINATION ${wpinet_config_dir}) -install(EXPORT wpinet DESTINATION ${wpinet_config_dir}) +install(FILES ${WPILIB_BINARY_DIR}/wpinet-config.cmake DESTINATION share/wpinet) +install(EXPORT wpinet DESTINATION share/wpinet) subdir_list(wpinet_examples "${CMAKE_CURRENT_SOURCE_DIR}/examples") foreach(example ${wpinet_examples}) diff --git a/wpiunits/CMakeLists.txt b/wpiunits/CMakeLists.txt index 7a5735edcbd..bb7cb696a2f 100644 --- a/wpiunits/CMakeLists.txt +++ b/wpiunits/CMakeLists.txt @@ -15,11 +15,5 @@ if (WITH_JAVA) set_property(TARGET wpiunits_jar PROPERTY FOLDER "java") - if (WITH_FLAT_INSTALL) - set (wpiunits_config_dir ${wpiunits_dest}) - else() - set (wpiunits_config_dir share/wpiunits) - endif() - - install(FILES wpiunits-config.cmake DESTINATION ${wpiunits_config_dir}) + install(FILES wpiunits-config.cmake DESTINATION share/wpiunits) endif() diff --git a/wpiutil/CMakeLists.txt b/wpiutil/CMakeLists.txt index a31929330e9..783dffa3895 100644 --- a/wpiutil/CMakeLists.txt +++ b/wpiutil/CMakeLists.txt @@ -205,15 +205,9 @@ target_include_directories(wpiutil PUBLIC install(TARGETS wpiutil EXPORT wpiutil) -if (WITH_FLAT_INSTALL) - set (wpiutil_config_dir ${wpilib_dest}) -else() - set (wpiutil_config_dir share/wpiutil) -endif() - configure_file(wpiutil-config.cmake.in ${WPILIB_BINARY_DIR}/wpiutil-config.cmake ) -install(FILES ${WPILIB_BINARY_DIR}/wpiutil-config.cmake DESTINATION ${wpiutil_config_dir}) -install(EXPORT wpiutil DESTINATION ${wpiutil_config_dir}) +install(FILES ${WPILIB_BINARY_DIR}/wpiutil-config.cmake DESTINATION share/wpiutil) +install(EXPORT wpiutil DESTINATION share/wpiutil) subdir_list(wpiutil_examples "${CMAKE_CURRENT_SOURCE_DIR}/examples") foreach(example ${wpiutil_examples}) diff --git a/xrpVendordep/CMakeLists.txt b/xrpVendordep/CMakeLists.txt index 2688fe0626b..039d90718cc 100644 --- a/xrpVendordep/CMakeLists.txt +++ b/xrpVendordep/CMakeLists.txt @@ -16,12 +16,6 @@ if (WITH_JAVA) install(FILES ${xrpVendordep_JAR_FILE} DESTINATION "${java_lib_dest}") set_property(TARGET xrpVendordep_jar PROPERTY FOLDER "java") - - if (WITH_FLAT_INSTALL) - set (xrpVendordep_config_dir ${wpilib_dest}) - else() - set (xrpVendordep_config_dir share/xrpVendordep) - endif() endif() if (WITH_JAVA_SOURCE) @@ -54,15 +48,9 @@ target_include_directories(xrpVendordep PUBLIC install(TARGETS xrpVendordep EXPORT xrpVendordep DESTINATION "${main_lib_dest}") install(DIRECTORY src/main/native/include/ DESTINATION "${include_dest}/xrpVendordep") -if (FLAT_INSTALL_WPILIB) - set(xrpVendordep_config_dir ${wpilib_dest}) - else() - set(xrpVendordep_config_dir share/xrpVendordep) - endif() - - configure_file(xrpVendordep-config.cmake.in ${WPILIB_BINARY_DIR}/xrpVendordep-config.cmake) - install(FILES ${WPILIB_BINARY_DIR}/xrpVendordep-config.cmake DESTINATION ${xrpVendordep_config_dir}) - install(EXPORT xrpVendordep DESTINATION ${xrpVendordep_config_dir}) +configure_file(xrpVendordep-config.cmake.in ${WPILIB_BINARY_DIR}/xrpVendordep-config.cmake) +install(FILES ${WPILIB_BINARY_DIR}/xrpVendordep-config.cmake DESTINATION share/xrpVendordep) +install(EXPORT xrpVendordep DESTINATION share/xrpVendordep) if (WITH_TESTS) wpilib_add_test(xrpVendordep src/test/native/cpp)