File: CMakeLists.txt

package info (click to toggle)
python-maxminddb 2.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,580 kB
  • sloc: ansic: 7,251; python: 1,520; perl: 987; makefile: 273; sh: 191
file content (24 lines) | stat: -rw-r--r-- 624 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# getopt is required by mmdblookup which is not available by default on Windows
# but available in mingw-64 toolchain by-default.

if(NOT MSVC)
  add_executable(mmdblookup
    mmdblookup.c
  )

# Otherwise 'undefined reference to WinMain' linker error happen due to wmain()
  if(MINGW)
    target_link_options(mmdblookup PRIVATE "-municode")
  endif()

  target_compile_definitions(mmdblookup PRIVATE PACKAGE_VERSION="${PROJECT_VERSION}")

  target_link_libraries(mmdblookup maxminddb pthread)

  if (MAXMINDDB_INSTALL)
    install(
      TARGETS mmdblookup
      DESTINATION ${CMAKE_INSTALL_BINDIR}
    )
  endif()
endif()