diff options
| author | Ryo Nakamura <upa@haeena.net> | 2023-12-10 17:06:57 +0900 |
|---|---|---|
| committer | Ryo Nakamura <upa@haeena.net> | 2023-12-10 17:06:57 +0900 |
| commit | abe94897aeecf296490b9eb37e8ef135f98c2437 (patch) | |
| tree | 9576330df51f61d761e2764c5b0f7ebd992bea58 | |
| parent | 260e39471d3d4384857e7598db4c1d481181a6eb (diff) | |
cmake: add INSTALL_EXECUTABLE_ONLY option
| -rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a5b720..d04f2a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,8 @@ if (BUILD_STATIC) endif() +option(INSTALL_EXECUTABLE_ONLY OFF) # do not install libmscp + # add libssh static library set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) @@ -104,7 +106,9 @@ set_target_properties(mscp-shared OUTPUT_NAME mscp PUBLIC_HEADER ${mscp_SOURCE_DIR}/include/mscp.h) -install(TARGETS mscp-shared) +if(!INSTALL_EXECUTABLE_ONLY) + install(TARGETS mscp-shared) +endif() # libmscp.a @@ -117,7 +121,9 @@ set_target_properties(mscp-static PROPERTIES OUTPUT_NAME mscp) -install(TARGETS mscp-static) +if(!INSTALL_EXECUTABLE_ONLY) + install(TARGETS mscp-static) +endif() # mscp executable |
