This is an automated email from the ASF dual-hosted git repository. asekretenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 8400df8d2ae1bcae632ae6729f6f0f6fc7d58904 Author: Andrei Sekretenko <asekrete...@apache.org> AuthorDate: Sun Apr 19 00:35:54 2020 +0200 Introduced install target into cmake build. Review: https://reviews.apache.org/r/72492 --- 3rdparty/CMakeLists.txt | 58 ++++++++++++++- cmake/CompilationConfigure.cmake | 101 ++++++++++++++++++++++----- src/CMakeLists.txt | 9 +++ src/checks/CMakeLists.txt | 3 + src/cli/CMakeLists.txt | 4 ++ src/java/CMakeLists.txt | 14 ++++ src/launcher/CMakeLists.txt | 8 +++ src/local/CMakeLists.txt | 4 ++ src/log/CMakeLists.txt | 3 + src/master/CMakeLists.txt | 4 ++ src/resource_provider/storage/CMakeLists.txt | 5 ++ src/slave/CMakeLists.txt | 1 + src/slave/container_loggers/CMakeLists.txt | 10 +++ src/slave/containerizer/mesos/CMakeLists.txt | 10 +++ src/slave/qos_controllers/CMakeLists.txt | 5 ++ src/slave/resource_estimators/CMakeLists.txt | 5 ++ src/usage/CMakeLists.txt | 3 + 17 files changed, 226 insertions(+), 21 deletions(-) diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 7b84f12..a2e6549 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -99,6 +99,15 @@ else () set(LIBRARY_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX}) endif () +if (WIN32 AND BUILD_SHARED_LIBS) + set(3RDPARTY_LIBS_INSTALL_DIR ${MESOS_INSTALL_RUNTIME}) +else() + set(3RDPARTY_LIBS_INSTALL_DIR ${MESOS_INSTALL_LIBRARIES}) +endif() + +set(LIBPROCESS_INSTALL_RUNTIME ${MESOS_INSTALL_RUNTIME}) +set(LIBPROCESS_INSTALL_LIBRARIES ${MESOS_INSTALL_LIBRARIES}) + # Sets a variable CMAKE_NOOP as noop operation. # # NOTE: This is especially important when building third-party libraries on @@ -281,6 +290,8 @@ if (WIN32) INSTALL_COMMAND ${CMAKE_NOOP} URL ${SASL2_URL} URL_HASH ${SASL2_HASH}) + + install(FILES $<TARGET_FILE:sasl2> DESTINATION ${3RDPARTY_LIBS_INSTALL_DIR}) else () find_library(SASL2_LIB sasl2) @@ -443,6 +454,17 @@ ExternalProject_Add( URL ${GLOG_URL} URL_HASH ${GLOG_HASH}) +if (WIN32 AND BUILD_SHARED_LIBS) + # NOTE: glog's install step places DLLs into ${GLOG_INSTALL_DIR}/bin . + install( + DIRECTORY ${GLOG_INSTALL_DIR}/bin/ + DESTINATION ${MESOS_INSTALL_RUNTIME}) +endif() + +install( + DIRECTORY ${GLOG_INSTALL_DIR}/lib/ + DESTINATION ${MESOS_INSTALL_LIBRARIES}) + # PicoJSON: JSON parser / serializer. # https://github.com/kazuho/picojson @@ -626,6 +648,11 @@ if (ENABLE_LIBEVENT) INSTALL_COMMAND ${CMAKE_NOOP} URL ${LIBEVENT_URL} URL_HASH ${LIBEVENT_HASH}) + + install( + FILES $<TARGET_FILE:libevent> + DESTINATION ${3RDPARTY_LIBS_INSTALL_DIR}) + else () find_package(LIBEVENT REQUIRED) add_library(libevent INTERFACE) @@ -668,6 +695,10 @@ elseif (NOT WIN32) # Windows defaults to `libwinio`, a native implementation. INSTALL_COMMAND ${MAKE_PROGRAM} install URL ${LIBEV_URL} URL_HASH ${LIBEV_HASH}) + + install( + DIRECTORY ${LIBEV_ROOT}-build/lib/ + DESTINATION ${3RDPARTY_LIBS_INSTALL_DIR}) endif () @@ -700,6 +731,11 @@ if (ENABLE_SECCOMP_ISOLATOR) INSTALL_COMMAND ${CMAKE_NOOP} URL ${LIBSECCOMP_URL} URL_HASH ${LIBSECCOMP_HASH}) + + install( + FILES $<TARGET_FILE:libseccomp> + DESTINATION ${3RDPARTY_LIBS_INSTALL_DIR}) + else () find_package(LIBSECCOMP REQUIRED) add_library(libseccomp SHARED IMPORTED GLOBAL) @@ -746,6 +782,8 @@ if (WIN32) INSTALL_COMMAND ${CMAKE_NOOP} URL ${LIBAPR_URL} URL_HASH ${LIBAPR_HASH}) + + install(FILES $<TARGET_FILE:apr> DESTINATION ${3RDPARTY_LIBS_INSTALL_DIR}) else () find_package(APR REQUIRED) add_library(apr SHARED IMPORTED) @@ -859,12 +897,14 @@ if (WIN32) # This copies the file `curl.exe` from the `3rdparty` build folder to # `build/src`, next to the other produced executables. This is necessary for - # code that shells out to cURL on Windows. - # - # TODO(andschwa): Change this to an `INSTALL` step. + # code that shells out to cURL on Windows (in particular, for running Mesos + # tests without running cmake install). ExternalProject_Add_Step(${CURL_TARGET} copy COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:curl> ${CMAKE_BINARY_DIR}/src/curl.exe DEPENDEES build) + + install(FILES $<TARGET_FILE:libcurl> DESTINATION ${3RDPARTY_LIBS_INSTALL_DIR}) + install(FILES $<TARGET_FILE:curl> DESTINATION ${MESOS_INSTALL_RUNTIME}) else () if ("${CURL_ROOT_DIR}" STREQUAL "") find_package(CURL REQUIRED) @@ -917,6 +957,8 @@ if (WIN32) INSTALL_COMMAND ${WCLAYER_INSTALL_CMD} DOWNLOAD_NO_EXTRACT FALSE URL ${WCLAYER_URL}) + + install(FILES $<TARGET_FILE:wclayer> DESTINATION ${MESOS_INSTALL_RUNTIME}) endif () # bzip2: A high-quality data compressor. @@ -963,6 +1005,8 @@ if (WIN32) INSTALL_DIR ${BZIP2_ROOT}-lib URL ${BZIP2_URL} URL_HASH ${BZIP2_HASH}) + + install(FILES $<TARGET_FILE:bzip2> DESTINATION ${3RDPARTY_LIBS_INSTALL_DIR}) endif () # xz: A Massively Spiffy Yet Delicately Unobtrusive Compression Library. @@ -1070,6 +1114,8 @@ if (WIN32) INSTALL_DIR ${ZLIB_ROOT}-lib URL ${ZLIB_URL} URL_HASH ${ZLIB_HASH}) + + install(FILES $<TARGET_FILE:zlib> DESTINATION ${3RDPARTY_LIBS_INSTALL_DIR}) else () find_package(ZLIB REQUIRED) add_library(zlib SHARED IMPORTED) @@ -1342,6 +1388,7 @@ ExternalProject_Add( URL ${PROTOBUF_URL} URL_HASH ${PROTOBUF_HASH}) +install(FILES $<TARGET_FILE:protobuf> DESTINATION ${3RDPARTY_LIBS_INSTALL_DIR}) # gRPC: Google's high performance, open-source universal RPC framework. # https://grpc.io/ @@ -1475,6 +1522,11 @@ ExternalProject_Add( URL ${GRPC_URL} URL_HASH ${GRPC_HASH}) +install( + FILES $<TARGET_FILE:libgpr> $<TARGET_FILE:libgrpc> $<TARGET_FILE:libgrpc++> + DESTINATION ${3RDPARTY_LIBS_INSTALL_DIR}) + + # Jemalloc: General-purpose malloc implementation. # http://jemalloc.net diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake index af1a8b5..d29c427 100644 --- a/cmake/CompilationConfigure.cmake +++ b/cmake/CompilationConfigure.cmake @@ -66,6 +66,14 @@ if (CMAKE_GENERATOR MATCHES "Visual Studio") endif () endif () +set( + MESOS_FINAL_PREFIX + ${CMAKE_INSTALL_PREFIX} + CACHE STRING + "Adjust built-in paths (rpath in shared objects, default paths in Mesos flags + and so on) so that cmake install output works after being copied into this prefix. + This is typically used by package managers that use different prefixes on a build + system and on a target system.") # 3RDPARTY OPTIONS. ################### @@ -390,15 +398,46 @@ if (NOT WIN32) add_compile_options(-fno-omit-frame-pointer) endif () - # Directory structure for some build artifacts. - # This is defined for use in tests. - set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) - set(SHARE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/share) - set(DATA_INSTALL_PREFIX ${SHARE_INSTALL_PREFIX}/mesos) + # Install layout definitions used in cmake install targets. + # These are relative to ${CMAKE_INSTALL_PREFIX}. + # + # NOTE: Windows and POSIX configurations have to define the same variables, + # but the layout is different! + set(MESOS_INSTALL_LAUNCHER libexec/mesos) # launcher executables + set(MESOS_INSTALL_RUNTIME bin) # all other executables + set(MESOS_INSTALL_LIBRARIES lib) # static and shared libraries + set(MESOS_INSTALL_HEADERS include) # headers + set(MESOS_INSTALL_DATA share/mesos) # data (webui, etc.) + + # File layout definitions that are used in the sources + # (for setting up installed tests and default values of flags). + # + # NOTE: If ${MESOS_FINAL_PREFIX} is set to a non-default value + # (i.e. differs from ${CMAKE_INSTALL_PREFIX}), cmake install output + # will only work after copying to ${MESOS_FINAL_PREFIX}. + + # - Path for data (webui, etc.). + set(DATA_INSTALL_PREFIX ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_DATA}) + + # - Path to launcher binaries. + set(PKG_LIBEXEC_INSTALL_DIR ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_LAUNCHER}) + + # - Path to libmesos shared object. + set(LIB_INSTALL_DIR ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_LIBRARIES}) + + # - Path to modules, including test modules. + set(PKG_MODULE_DIR ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_LIBRARIES}) + + # - Path to test-helper and (in the future) test scripts. + # TODO(asekretenko): Either port script tests to cmake or drop them. + set(TEST_LIB_EXEC_DIR ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_RUNTIME}) - set(LIBEXEC_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/libexec) - set(PKG_LIBEXEC_INSTALL_DIR ${LIBEXEC_INSTALL_DIR}/mesos) - set(LIB_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/libmesos) + # - Path to Mesos binaries, used in tests. + set(S_BIN_DIR ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_RUNTIME}) + + # We add an RPATH pointing to the planned shared libraries location. + set(CMAKE_INSTALL_RPATH + "${CMAKE_INSTALL_RPATH};${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_LIBRARIES}") endif () option(ENABLE_GC_UNUSED @@ -565,16 +604,42 @@ if (WIN32) -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) - # Directory structure definitions. - # TODO(hausdorff): (MESOS-5455) These are placeholder values. - # Transition away from them. - set(EXEC_INSTALL_PREFIX "WARNINGDONOTUSEME") - set(LIBEXEC_INSTALL_DIR "WARNINGDONOTUSEME") - set(PKG_LIBEXEC_INSTALL_DIR "WARNINGDONOTUSEME") - set(LIB_INSTALL_DIR "WARNINGDONOTUSEME") - set(TEST_LIB_EXEC_DIR "WARNINGDONOTUSEME") - set(PKG_MODULE_DIR "WARNINGDONOTUSEME") - set(S_BIN_DIR "WARNINGDONOTUSEME") + # Install layout definitions used in cmake install targets. + # These are relative to ${CMAKE_INSTALL_PREFIX}. + # + # NOTE: Windows and POSIX configurations have to define the same variables, + # but the layout is different! + set(MESOS_INSTALL_RUNTIME bin) # all executables and DLLs + set(MESOS_INSTALL_LAUNCHER ${MESOS_INSTALL_RUNTIME}) + set(MESOS_INSTALL_LIBRARIES lib) # static libraries + set(MESOS_INSTALL_HEADERS include) # headers + set(MESOS_INSTALL_DATA share/mesos) # data (webui, etc.) + + # File layout definitions that are used in the sources + # (for setting up installed tests and default values of flags). + # + # NOTE: If ${MESOS_FINAL_PREFIX} is set to a non-default value + # (i.e. differs from ${CMAKE_INSTALL_PREFIX}), cmake install output + # will only work after copying to ${MESOS_FINAL_PREFIX}. + + # - Path for data (webui, etc.) + set(DATA_INSTALL_PREFIX ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_DATA}) + + # - Path to launcher binaries + set(PKG_LIBEXEC_INSTALL_DIR ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_RUNTIME}) + + # - Path to libmesos shared object + set(LIB_INSTALL_DIR ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_RUNTIME}) + + # - Path to modules, including test modules + set(PKG_MODULE_DIR ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_RUNTIME}) + + # - Path to test-helper and (in the future) test scripts. + # TODO(asekretenko): Either port script tests to Windows or drop them. + set(TEST_LIB_EXEC_DIR ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_RUNTIME}) + + # - Path to Mesos binaries, used in tests + set(S_BIN_DIR ${MESOS_FINAL_PREFIX}/${MESOS_INSTALL_RUNTIME}) endif () diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 810acbf..a43142f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -668,6 +668,15 @@ if (NOT WIN32) endif() +install( + TARGETS + mesos-protobufs + mesos + RUNTIME DESTINATION ${MESOS_INSTALL_RUNTIME} + ARCHIVE DESTINATION ${MESOS_INSTALL_LIBRARIES} + LIBRARY DESTINATION ${MESOS_INSTALL_LIBRARIES}) + + # BUILD THE MESOS TESTS. ######################## add_subdirectory(tests) diff --git a/src/checks/CMakeLists.txt b/src/checks/CMakeLists.txt index a3a6aed..518b45a 100644 --- a/src/checks/CMakeLists.txt +++ b/src/checks/CMakeLists.txt @@ -18,3 +18,6 @@ ################################### add_executable(mesos-tcp-connect tcp_connect.cpp) target_link_libraries(mesos-tcp-connect PRIVATE mesos) +install( + TARGETS mesos-tcp-connect + RUNTIME DESTINATION ${MESOS_INSTALL_LAUNCHER}) diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txt index e99b055..2c7310a 100644 --- a/src/cli/CMakeLists.txt +++ b/src/cli/CMakeLists.txt @@ -26,6 +26,10 @@ target_link_libraries(mesos-execute PRIVATE mesos) add_executable(mesos-resolve resolve.cpp) target_link_libraries(mesos-resolve PRIVATE mesos) +install( + TARGETS mesos-execute mesos-resolve + RUNTIME DESTINATION ${MESOS_INSTALL_RUNTIME}) + # MESOS CLI. # Soon to be deprecated old version of the Mesos CLI. ##################################################### diff --git a/src/java/CMakeLists.txt b/src/java/CMakeLists.txt index 81eb9b5..0777035 100644 --- a/src/java/CMakeLists.txt +++ b/src/java/CMakeLists.txt @@ -11,6 +11,7 @@ # impossible to use. set(MESOS_JAR ${CMAKE_CURRENT_BINARY_DIR}/target/mesos-${MESOS_PACKAGE_VERSION}.jar) set(PROTOBUF_JAR ${CMAKE_CURRENT_BINARY_DIR}/target/dependency/protobuf-java-${PROTOBUF_VERSION}.jar) +set(MESOS_SHADED_PROTOBUF_JAR ${CMAKE_CURRENT_BINARY_DIR}/target/mesos-${PACKAGE_VERSION}-shaded-protobuf.jar) # This file is generated into the build tree. set(MESOS_JAVA_LIBRARY generated/org/apache/mesos/MesosNativeLibrary.java) @@ -128,3 +129,16 @@ target_include_directories( ${JNI_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}/jni ${MESOS_PUBLIC_INCLUDE_DIR}) + +install( + TARGETS mesos-java + RUNTIME DESTINATION ${MESOS_INSTALL_RUNTIME} + LIBRARY DESTINATION ${MESOS_INSTALL_LIBRARIES} + ARCHIVE DESTINATION ${MESOS_INSTALL_LIBRARIES}) + +# NOTE: Currently, the automake build installs Java packages differently. +# Namely, `make install` doesn't install Java packages at all, and +# `make maven-install` calls `mvn install` for package installation. +install( + FILES ${MESOS_JAR} ${MESOS_SHADED_PROTOBUF_JAR} + DESTINATION ${MESOS_INSTALL_LIBRARIES}) diff --git a/src/launcher/CMakeLists.txt b/src/launcher/CMakeLists.txt index 73587f4..9e6bb16 100644 --- a/src/launcher/CMakeLists.txt +++ b/src/launcher/CMakeLists.txt @@ -29,3 +29,11 @@ target_link_libraries(mesos-fetcher PRIVATE mesos) ################################# add_executable(mesos-docker-executor docker_executor.cpp) target_link_libraries(mesos-docker-executor PRIVATE mesos) + +install( + TARGETS + mesos-default-executor + mesos-executor + mesos-fetcher + mesos-docker-executor + RUNTIME DESTINATION ${MESOS_INSTALL_LAUNCHER}) diff --git a/src/local/CMakeLists.txt b/src/local/CMakeLists.txt index 7be3ede..fce43b4 100644 --- a/src/local/CMakeLists.txt +++ b/src/local/CMakeLists.txt @@ -22,4 +22,8 @@ if (NOT WIN32) add_executable(mesos-local main.cpp) target_link_libraries(mesos-local PRIVATE mesos) add_dependencies(mesos-local mesos-agent mesos-master) + + install( + TARGETS mesos-local + RUNTIME DESTINATION ${MESOS_INSTALL_RUNTIME}) endif () diff --git a/src/log/CMakeLists.txt b/src/log/CMakeLists.txt index 1c94470..994d24f 100644 --- a/src/log/CMakeLists.txt +++ b/src/log/CMakeLists.txt @@ -21,4 +21,7 @@ if (NOT WIN32) ################################################### add_executable(mesos-log main.cpp) target_link_libraries(mesos-log PRIVATE mesos) + install( + TARGETS mesos-log + RUNTIME DESTINATION ${MESOS_INSTALL_RUNTIME}) endif () diff --git a/src/master/CMakeLists.txt b/src/master/CMakeLists.txt index f4b15b5..bb595c3 100644 --- a/src/master/CMakeLists.txt +++ b/src/master/CMakeLists.txt @@ -21,3 +21,7 @@ target_link_libraries(mesos-master PRIVATE mesos) if (ENABLE_JEMALLOC_ALLOCATOR) target_link_libraries(mesos-master PRIVATE jemalloc) endif () + +install( + TARGETS mesos-master + RUNTIME DESTINATION ${MESOS_INSTALL_RUNTIME}) diff --git a/src/resource_provider/storage/CMakeLists.txt b/src/resource_provider/storage/CMakeLists.txt index 90fdd61..d1fb95d 100644 --- a/src/resource_provider/storage/CMakeLists.txt +++ b/src/resource_provider/storage/CMakeLists.txt @@ -19,3 +19,8 @@ # NOTE: This library uses underscores to be consistent with other modules. add_library(uri_disk_profile_adaptor uri_disk_profile_adaptor.cpp) target_link_libraries(uri_disk_profile_adaptor PRIVATE mesos) +install( + TARGETS uri_disk_profile_adaptor + RUNTIME DESTINATION ${MESOS_INSTALL_RUNTIME} + LIBRARY DESTINATION ${MESOS_INSTALL_LIBRARIES} + ARCHIVE DESTINATION ${MESOS_INSTALL_LIBRARIES}) diff --git a/src/slave/CMakeLists.txt b/src/slave/CMakeLists.txt index f42a4a6..4264b90 100644 --- a/src/slave/CMakeLists.txt +++ b/src/slave/CMakeLists.txt @@ -23,6 +23,7 @@ add_subdirectory(resource_estimators) ####################### add_executable(mesos-agent main.cpp) target_link_libraries(mesos-agent PRIVATE mesos) +install(TARGETS mesos-agent RUNTIME DESTINATION ${MESOS_INSTALL_RUNTIME}) if (ENABLE_JEMALLOC_ALLOCATOR) target_link_libraries(mesos-agent PRIVATE jemalloc) diff --git a/src/slave/container_loggers/CMakeLists.txt b/src/slave/container_loggers/CMakeLists.txt index b4f79a4..6e08c23 100644 --- a/src/slave/container_loggers/CMakeLists.txt +++ b/src/slave/container_loggers/CMakeLists.txt @@ -31,4 +31,14 @@ if (NOT WIN32) add_dependencies( logrotate_container_logger mesos-logrotate-logger) + + install( + TARGETS mesos-logrotate-logger + RUNTIME DESTINATION ${MESOS_INSTALL_LAUNCHER}) + + install( + TARGETS logrotate_container_logger + RUNTIME DESTINATION ${MESOS_INSTALL_RUNTIME} + LIBRARY DESTINATION ${MESOS_INSTALL_LIBRARIES} + ARCHIVE DESTINATION ${MESOS_INSTALL_LIBRARIES}) endif () diff --git a/src/slave/containerizer/mesos/CMakeLists.txt b/src/slave/containerizer/mesos/CMakeLists.txt index 92f4a49..c6fae0f 100644 --- a/src/slave/containerizer/mesos/CMakeLists.txt +++ b/src/slave/containerizer/mesos/CMakeLists.txt @@ -18,6 +18,9 @@ ############################### add_executable(mesos-containerizer main.cpp) target_link_libraries(mesos-containerizer PRIVATE mesos) +install( + TARGETS mesos-containerizer + RUNTIME DESTINATION ${MESOS_INSTALL_LAUNCHER}) if (NOT WIN32) add_executable(mesos-io-switchboard io/switchboard_main.cpp) @@ -29,9 +32,16 @@ if (NOT WIN32) isolators/network/cni/plugins/port_mapper/port_mapper.cpp) target_link_libraries(mesos-cni-port-mapper PRIVATE mesos) + + install( + TARGETS mesos-io-switchboard mesos-cni-port-mapper + RUNTIME DESTINATION ${MESOS_INSTALL_LAUNCHER}) endif () if (ENABLE_PORT_MAPPING_ISOLATOR) add_executable(mesos-network-helper isolators/network/helper.cpp) target_link_libraries(mesos-network-helper PRIVATE mesos) + install( + TARGETS mesos-network-helper + RUNTIME DESTINATION ${MESOS_INSTALL_LAUNCHER}) endif () diff --git a/src/slave/qos_controllers/CMakeLists.txt b/src/slave/qos_controllers/CMakeLists.txt index ff9cc15..da79eec 100644 --- a/src/slave/qos_controllers/CMakeLists.txt +++ b/src/slave/qos_controllers/CMakeLists.txt @@ -19,3 +19,8 @@ # NOTE: This library uses underscores to be consistent with other modules. add_library(load_qos_controller load.cpp) target_link_libraries(load_qos_controller PRIVATE mesos) +install( + TARGETS load_qos_controller + RUNTIME DESTINATION ${MESOS_INSTALL_RUNTIME} + LIBRARY DESTINATION ${MESOS_INSTALL_LIBRARIES} + ARCHIVE DESTINATION ${MESOS_INSTALL_LIBRARIES}) diff --git a/src/slave/resource_estimators/CMakeLists.txt b/src/slave/resource_estimators/CMakeLists.txt index 6f32421..ddbb094 100644 --- a/src/slave/resource_estimators/CMakeLists.txt +++ b/src/slave/resource_estimators/CMakeLists.txt @@ -20,3 +20,8 @@ # `src/tests/oversubscription_tests.cpp`. add_library(fixed_resource_estimator fixed.cpp) target_link_libraries(fixed_resource_estimator PRIVATE mesos) +install( + TARGETS fixed_resource_estimator + RUNTIME DESTINATION ${MESOS_INSTALL_RUNTIME} + LIBRARY DESTINATION ${MESOS_INSTALL_LIBRARIES} + ARCHIVE DESTINATION ${MESOS_INSTALL_LIBRARIES}) diff --git a/src/usage/CMakeLists.txt b/src/usage/CMakeLists.txt index e51fe1e..60dc4a3 100644 --- a/src/usage/CMakeLists.txt +++ b/src/usage/CMakeLists.txt @@ -18,3 +18,6 @@ ####################### add_executable(mesos-usage main.cpp) target_link_libraries(mesos-usage PRIVATE mesos) +install( + TARGETS mesos-usage + RUNTIME DESTINATION ${MESOS_INSTALL_LAUNCHER})