aboutsummaryrefslogtreecommitdiffstats
path: root/filedistribution/src/vespa/filedistribution/manager/CMakeLists.txt
blob: c311ab9de1e47308f12bd76e867588b923fccc9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
vespa_add_library(filedistribution_filedistributionmanager
    SOURCES
    ${CMAKE_CURRENT_BINARY_DIR}/com_yahoo_vespa_filedistribution_FileDistributionManager.h
    createtorrent.cpp
    filedb.cpp
    filedistributionmanager.cpp
    stderr_logfwd.cpp
    $<TARGET_OBJECTS:filedistribution_filedbmodel>
    $<TARGET_OBJECTS:filedistribution_exceptionrethrower>
    INSTALL lib64
    OUTPUT_NAME filedistributionmanager
    DEPENDS
    boost_system${BOOST_LIB_SUFFIX}
    boost_thread${BOOST_LIB_SUFFIX}
    boost_filesystem${BOOST_LIB_SUFFIX}
    zookeeper_mt
    ${JAVA_JVM_LIBRARY}
)
target_include_directories(filedistribution_filedistributionmanager PUBLIC SYSTEM ${JNI_INCLUDE_DIRS})
add_custom_command(
    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/com_yahoo_vespa_filedistribution_FileDistributionManager.h
    COMMAND javah -classpath ${PROJECT_SOURCE_DIR}/filedistributionmanager/target/filedistributionmanager.jar com.yahoo.vespa.filedistribution.FileDistributionManager
    MAIN_DEPENDENCY ${PROJECT_SOURCE_DIR}/filedistributionmanager/target/filedistributionmanager.jar
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)