Skip to content

Commit

Permalink
Add option to just install the library target
Browse files Browse the repository at this point in the history
Signed-off-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
hikinggrass committed Jan 24, 2024
1 parent 4ae306a commit 35244d0
Showing 1 changed file with 8 additions and 0 deletions.
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

0 comments on commit 35244d0

Please sign in to comment.