<commit_before>cmake_minimum_required(VERSION 3.1.2)
project(conan-libpqxx)

include(conanbuildinfo.cmake)
conan_basic_setup()

if (WIN32)
    add_definitions(-DWIN32 -D_MBCS -D_WINDOWS -DPQXX_INTERNAL -DNOMINMAX)
endif()

add_subdirectory(source_subfolder)

if (BUILD_SHARED_LIBS AND WIN32)
    # Fixes build missing Windows DLL entry point: https://github.com/jtv/libpqxx/pull/167
    target_sources(pqxx_shared PRIVATE "${CMAKE_SOURCE_DIR}/source_subfolder/win32/libpqxx.cxx")
endif()<commit_msg>Fixes link error on WIndows<commit_after>cmake_minimum_required(VERSION 3.1.2)
project(conan-libpqxx)

include(conanbuildinfo.cmake)
conan_basic_setup()

if (WIN32)
    add_definitions(-DWIN32 -D_MBCS -D_WINDOWS -DPQXX_INTERNAL -DNOMINMAX)
endif()

# execute the `find_package(PostgreSQL REQUIRED)` before libpqxx,
# because libpqxx overwrites `CMAKE_MODULE_PATH`, `FindPostgreSQL.cmake`
# generated by CONAN will not be used.
# this will cause the problem that libraries dependent on libpq will not be linked,
# so define variables first.
find_package(PostgreSQL REQUIRED)

add_subdirectory(source_subfolder)

if (BUILD_SHARED_LIBS AND WIN32)
    # Fixes build missing Windows DLL entry point: https://github.com/jtv/libpqxx/pull/167
    target_sources(pqxx_shared PRIVATE "${CMAKE_SOURCE_DIR}/source_subfolder/win32/libpqxx.cxx")
endif()
{'fraction_non_alphanumeric': 0.09491778774289986, 'fraction_numerical': 0.02092675635276532, 'mean_word_length': 6.2771739130434785, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4066525', 'n_tokens_mistral': 521, 'n_tokens_neox': 484, 'n_words': 101}