memgraph/query_modules/louvain/CMakeLists.txt
Ivan Paljak 7467d52d5b Add cmake files and a dummy louvain query module
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D2561
2019-11-25 16:38:56 +01:00

26 lines
749 B
CMake

set(MAIN src/main.cpp)
set(MODULE src/louvain_module.cpp)
set(SOURCES src/algorithms/louvain.cpp
src/data_structures/graph.cpp)
include_directories(src)
add_library(louvain-core STATIC ${SOURCES})
set_target_properties(louvain-core PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_link_libraries(louvain-core PUBLIC Threads::Threads glog gflags)
add_executable(louvain-main ${MAIN})
target_link_libraries(louvain-main louvain-core)
enable_testing()
add_subdirectory(test)
add_library(louvain SHARED ${MODULE})
target_include_directories(louvain PRIVATE ${CMAKE_SOURCE_DIR}/include)
if (NOT MG_COMMUNITY)
install(PROGRAMS $<TARGET_FILE:louvain>
DESTINATION lib/memgraph/query_modules
RENAME louvain.so)
endif()