-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
26 lines (21 loc) · 733 Bytes
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.10)
project(rdup VERSION 1.0 LANGUAGES CXX)
option(WITH_PYTHON "Build Python Bindings" OFF)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Choose the type of build, options are: Debug Release
RelWithDebInfo MinSizeRel."
FORCE)
endif()
# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
if (WITH_PYTHON)
add_subdirectory(vendor/pybind11)
add_definitions("-DVERSION_INFO=${VERSION_INFO}")
pybind11_add_module(removedup removedup.cpp dedup.cpp)
install(TARGETS removedup LIBRARY DESTINATION lib)
endif()
add_executable(rdup main.cpp dedup.cpp)
target_link_libraries(rdup)
install(TARGETS rdup RUNTIME DESTINATION bin)