open-simulation-platform / libcosimc

OSP C co-simulation API
Mozilla Public License 2.0
12 stars 2 forks source link

Could not find package configuration libcosimConfig.cmake #22

Closed andre2007 closed 4 years ago

andre2007 commented 4 years ago

I want to make use of the libcosimc and tried to compile it from the sources

FROM debian:buster

RUN apt-get update && apt-get upgrade -y \
    && apt-get install -y curl unzip git build-essential gcc cmake python3-pip

RUN pip3 install conan \
    && conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-public

RUN curl -L -o libcosimc.zip https://github.com/open-simulation-platform/libcosimc/archive/v0.7.0.zip \
    && unzip libcosimc.zip -d / \
    && cd /libcosimc-0.7.0 \
    && mkdir build \
    && cd build \
    && CONAN_REVISIONS_ENABLED=1 conan install .. -s build_type=Release --build=missing -o libcosim:'fmuproxy=True' --settings=compiler.libcxx=libstdc++11

RUN cd /libcosimc-0.7.0/build \
    && cmake .. -DLIBCOSIM_USING_CONAN=TRUE -DLIBCOSIM_BUILD_APIDOC=OFF -DCMAKE_BUILD_TYPE=Release \
    && cmake --build .
 /libcosimc-0.7.0/build/output/release/lib/libcosimc.so

This throws the error

CMake Error at CMakeLists.txt:115 (find_package): By not providing "Findlibcosim.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "libcosim", but CMake did not find one. Could not find a package configuration file provided by "libcosim" with any of the following names: libcosimConfig.cmake libcosim-config.cmake

Could you please enhance the README with some more instructions how to compile libcosimc?

andre2007 commented 4 years ago

Issue was caused by DLIBCOSIM_USING_CONAN instead of DLIBCOSIMC_USING_CONAN