cmake_minimum_required(VERSION 3.23) project(NlpCodec LANGUAGES CXX) # Find ZLib packages find_package(ZLIB REQUIRED) # Build executable add_executable(NlpCodec "") # Setup sources file and no need to setup headers target_sources(NlpCodec PRIVATE NlpCodec.cpp ) # Link with ZLib target_link_libraries(NlpCodec PRIVATE ${ZLIB_LIBRARIES} ) # Setup standard set_target_properties(NlpCodec PROPERTIES CXX_STANDARD 20 CXX_STANDARD_REQUIRED 20 CXX_EXTENSION OFF ) # Extra options for MSVC # Unicode charset target_compile_definitions(NlpCodec PRIVATE $<$:UNICODE> $<$:_UNICODE> ) # Order UTF-8 in both runtime and source environment target_compile_options(NlpCodec PRIVATE $<$:/utf-8> ) # Install built artifact include(GNUInstallDirs) install(TARGETS NlpCodec RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )