diff --git a/CMakeLists.txt b/CMakeLists.txt index 3894586b7..fcc1204ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ option(BUILD_TESTING "Run unit tests" OFF) option(CMAKE_RUN_CLANG_TIDY "Run clang-tidy" OFF) option(LIBOCPP_BUILD_EXAMPLES "Build charge_point and central_system binaries." OFF) option(OCPP_INSTALL "Install the library (shared data might be installed anyway)" ${EVC_MAIN_PROJECT}) +option(LIBOCPP_INSTALL_LIBRARY "Install the libocpp library (for example when built as a shared library)" OFF) # dependencies find_package(Boost COMPONENTS program_options regex system thread REQUIRED) @@ -75,6 +76,13 @@ if (OCPP_INSTALL) ) endif() +if (LIBOCPP_INSTALL_LIBRARY) + install( + TARGETS ocpp + LIBRARY + ) +endif() + if(LIBOCPP16_BUILD_EXAMPLES) message("Building libocpp 1.6 example binaries.")