Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to just install the library target #414

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.")
Expand Down