Files
ANSCORE/core/ANSLicensingSystem/CMakeLists.txt

66 lines
1.7 KiB
CMake
Raw Normal View History

2026-03-28 16:54:11 +11:00
# ANSLicensingSystem — DLL for license validation (also used by LabVIEW)
add_library(ANSLicensingSystem SHARED
ANSLicense.cpp
ANSLicense.h
Utility.cpp
Utility.h
pch.cpp
pch.h
framework.h
dllmain.cpp
)
target_include_directories(ANSLicensingSystem PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${SHARED_INCLUDE_DIR}
# These are needed by consumers because ANSLicense.h / Utility.h include them
2026-03-29 14:10:05 +11:00
${ANSLIBS_DIR} # for LabVIEWHeader/extcode.h
2026-03-28 16:54:11 +11:00
${ANSLIBS_DIR}/ZLIB/include # for zlib.h (Utility.h includes it)
${VCPKG_INCLUDE_DIR} # for zip.h (Utility.h includes it)
)
target_include_directories(ANSLicensingSystem PRIVATE
2026-03-29 14:10:05 +11:00
${ANSLIBS_DIR}/ANS-HWiNFO/include
${ANSLIBS_DIR}/spdlog/include
2026-03-28 16:54:11 +11:00
)
target_link_libraries(ANSLicensingSystem
PRIVATE anslicensing
PRIVATE labview
PRIVATE opencv
PRIVATE zlib_dep
PRIVATE spdlog_dep
2026-03-29 14:10:05 +11:00
PUBLIC boost
2026-03-28 16:54:11 +11:00
)
target_link_directories(ANSLicensingSystem PRIVATE
2026-03-29 14:10:05 +11:00
${ANSLIBS_DIR}/ANS-HWiNFO/lib
${ANSLIBS_DIR}/boost/lib
2026-03-28 16:54:11 +11:00
${VCPKG_LIB_DIR}
)
# BASE64 class — not exported from anslicensing.dll, compile directly
target_include_directories(ANSLicensingSystem PRIVATE
2026-03-28 19:56:39 +11:00
${CMAKE_SOURCE_DIR}/core/anslicensing
2026-03-28 16:54:11 +11:00
)
target_sources(ANSLicensingSystem PRIVATE
2026-03-28 19:56:39 +11:00
${CMAKE_SOURCE_DIR}/core/anslicensing/base64.cpp
2026-03-28 16:54:11 +11:00
)
target_link_libraries(ANSLicensingSystem PRIVATE
HWiNFO.lib OpenCL.lib OpenCLExt.lib
bz2.lib zip.lib
libboost_log-vc143-mt-x64-1_82.lib
shlwapi.lib winhttp.lib
${WIN_COMMON_LIBS}
)
target_compile_definitions(ANSLicensingSystem PRIVATE
ANSLICENSE_EXPORTS
ANSLICENSINGSYSTEM_EXPORTS
UNICODE _UNICODE
_USRDLL
)
target_precompile_headers(ANSLicensingSystem PRIVATE pch.h)