Fix install dir of CycloneDDSConfig.cmake (#321)

Installing Cyclone DDS for multiple architectures with the same
installation prefix gave problems because the CMake configuration files
ended up overwriting each other.  This brings it in line with the
recommended locations.  Thanks to @hansfn.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-11-17 21:27:45 +01:00 committed by eboasson
parent 3da21315f2
commit e43bdb73c7
9 changed files with 34 additions and 38 deletions

View file

@ -191,11 +191,12 @@ before_script:
# code has been vetted, the test has been run a great many times (with the odd
# failure), and so we now simply skip the test to avoid the spurious failures.
script:
- INSTALLPREFIX="$(pwd)/install"
- mkdir build
- cd build
- conan install -b missing -s arch=${ARCH} -s build_type=${BUILD_TYPE} ..
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=$(pwd)/install
-DCMAKE_INSTALL_PREFIX=${INSTALLPREFIX}
-DUSE_SANITIZER=${ASAN}
-DENABLE_SSL=${SSL}
-DBUILD_TESTING=on
@ -217,12 +218,15 @@ script:
CMAKE_LINKER_FLAGS="-DCMAKE_LINKER_FLAGS=-fsanitize=${USE_SANITIZER}";
CMAKE_C_FLAGS="-DCMAKE_C_FLAGS=-fsanitize=${USE_SANITIZER}";
fi
- mkdir install/share/CycloneDDS/examples/helloworld/build
- cd install/share/CycloneDDS/examples/helloworld/build
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
- cd ..
- mkdir helloworld_build
- cd helloworld_build
- cmake -DCMAKE_PREFIX_PATH=${INSTALLPREFIX}
-DCMAKE_BUILD_TYPE=${BUILD_TYPE}
${CMAKE_C_FLAGS}
${CMAKE_LINKER_FLAGS}
-G "${GENERATOR}" ..
-G "${GENERATOR}"
${INSTALLPREFIX}/share/CycloneDDS/examples/helloworld
- cmake --build . --config ${BUILD_TYPE}
- cd "${TRAVIS_BUILD_DIR}/build"