aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/tld/CMakeLists.txt
blob: 0a8cb1877c2b93c5c94238ed63ead29ac3f687e5 (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
find_package(Python2)

add_library(library-cpp-tld)
target_link_libraries(library-cpp-tld PUBLIC
  contrib-libs-cxxsupp
  yutil
  cpp-digest-lower_case
)
target_sources(library-cpp-tld INTERFACE
  ${CMAKE_BINARY_DIR}/library/cpp/tld/tld.inc
)
target_sources(library-cpp-tld PRIVATE
  ${CMAKE_SOURCE_DIR}/library/cpp/tld/tld.cpp
)
add_custom_command(
  OUTPUT
  ${CMAKE_BINARY_DIR}/library/cpp/tld/tld.inc
  DEPENDS
  ${CMAKE_SOURCE_DIR}/library/cpp/tld/tlds-alpha-by-domain.txt
  ${CMAKE_SOURCE_DIR}/library/cpp/tld/gen_tld.py
  COMMAND
  Python2::Interpreter
  ${CMAKE_SOURCE_DIR}/library/cpp/tld/gen_tld.py
  ${CMAKE_SOURCE_DIR}/library/cpp/tld/tlds-alpha-by-domain.txt
  >
  tld.inc
)