# anslicensing — Licensing SDK (shared library, built from source)
file(GLOB ANSLICENSING_SOURCES "*.cpp" "*.c")
file(GLOB ANSLICENSING_HEADERS "*.h")

add_library(anslicensing SHARED ${ANSLICENSING_SOURCES} ${ANSLICENSING_HEADERS})

target_include_directories(anslicensing PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${SHARED_INCLUDE_DIR}
)

target_compile_definitions(anslicensing PRIVATE ANSLICENSING_EXPORTS LICENSING_EXPORTS _USRDLL)
if(WIN32)
    target_link_libraries(anslicensing PRIVATE ${WIN_COMMON_LIBS} winhttp)
else()
    target_link_libraries(anslicensing PRIVATE ${UNIX_COMMON_LIBS} curl ssl crypto)
endif()
