diff --git a/.github/workflows/conda-ci.yml b/.github/workflows/conda-ci.yml index e4ef4db..c6ed1f0 100644 --- a/.github/workflows/conda-ci.yml +++ b/.github/workflows/conda-ci.yml @@ -51,19 +51,14 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: conda-incubator/setup-miniconda@v2 + - uses: conda-incubator/setup-miniconda@v3 with: - miniforge-variant: Mambaforge miniforge-version: latest - name: Dependencies shell: bash -l {0} run: | - # Compilation related dependencies - mamba install cmake compilers make ninja pkg-config - # Actual dependencies - mamba install -c conda-forge -c robostack-staging ycm-cmake-modules ace ros-noetic-ros-base - + conda install -c conda-forge -c robostack-staging ycm-cmake-modules ace ros-noetic-ros-base cmake compilers make ninja pkg-config - name: Download YARP [Linux&macOS] if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5349a23..84df04e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,18 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) option(BUILD_SHARED_LIBS "Compile shared libraries rather than linking statically" ON) mark_as_advanced(BUILD_SHARED_LIBS) + +# Control where libraries and executables are placed during the build. +# With the following settings executables are placed in /bin and libraries/archives in /lib. +# This is particularly useful to run ctests on libraries built on Windows +# machines: tests, which are executables, are placed in the same folders of +# dlls, which are treated as executables as well, so that they can properly +# find the libraries to run. This is a because of missing RPATH on Windows. +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}") +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}") + set(YARP_DLL OFF) if(BUILD_SHARED_LIBS) set(YARP_DLL ON)