1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-07-01 14:37:10 +02:00
Files
SqMod/vendor/MaxmindDB/bin/CMakeLists.txt
Sandu Liviu Catalin f2b7499f85 Update libraries and make it build on windows.
Still gets some warnings because compilers have changed. But should work.
2025-06-25 22:34:23 +03:00

25 lines
624 B
CMake

# 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()