Skip to content

Commit 35244d0

Browse files
committed
Add option to just install the library target
Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
1 parent 4ae306a commit 35244d0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ option(BUILD_TESTING "Run unit tests" OFF)
1515
option(CMAKE_RUN_CLANG_TIDY "Run clang-tidy" OFF)
1616
option(LIBOCPP_BUILD_EXAMPLES "Build charge_point and central_system binaries." OFF)
1717
option(OCPP_INSTALL "Install the library (shared data might be installed anyway)" ${EVC_MAIN_PROJECT})
18+
option(LIBOCPP_INSTALL_LIBRARY "Install the libocpp library (for example when built as a shared library)" OFF)
1819

1920
# dependencies
2021
find_package(Boost COMPONENTS program_options regex system thread REQUIRED)
@@ -75,6 +76,13 @@ if (OCPP_INSTALL)
7576
)
7677
endif()
7778

79+
if (LIBOCPP_INSTALL_LIBRARY)
80+
install(
81+
TARGETS ocpp
82+
LIBRARY
83+
)
84+
endif()
85+
7886

7987
if(LIBOCPP16_BUILD_EXAMPLES)
8088
message("Building libocpp 1.6 example binaries.")

0 commit comments

Comments
 (0)