File tree Expand file tree Collapse file tree
backend/CaseConversionAPI/CppLib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7171 -DPROCESSSTRING_EXPORTS=ON `
7272 -G "Visual Studio 17 2022" -A x64
7373
74+ - name : Configure DLL (Windows)
75+ if : runner.os == 'Windows'
76+ run : |
77+ cmake -S backend/CaseConversionAPI/CppLib `
78+ -B backend/CaseConversionAPI/CppLib/build_dll `
79+ -DCMAKE_BUILD_TYPE=Release `
80+ -DPROCESSSTRING_EXPORTS=ON `
81+ -G "Visual Studio 17 2022" -A x64
82+
7483 - name : Build DLL
7584 run : cmake --build backend/CaseConversionAPI/CppLib/build_dll --config Release --parallel
7685
Original file line number Diff line number Diff line change @@ -40,6 +40,15 @@ target_include_directories(StringConversionLib PUBLIC include)
4040# ---------------------------
4141# This creates the actual file (libProcessStringDLL.dylib / .so) for .NET
4242add_library (ProcessStringDLL SHARED src/ProcessStringDLL.cpp )
43+
44+ # This tells the compiler "We are BUILDING the DLL, not using it"
45+ target_compile_definitions (ProcessStringDLL PRIVATE PROCESSSTRING_EXPORTS )
46+
47+ # This silences the 'strcpy' warning (C4996) seen in your logs
48+ if (WIN32 )
49+ target_compile_definitions (ProcessStringDLL PRIVATE _CRT_SECURE_NO_WARNINGS )
50+ endif ()
51+
4352target_link_libraries (ProcessStringDLL PRIVATE StringConversionLib )
4453
4554# Ensure the "lib" prefix is consistent for your scripts
You can’t perform that action at this time.
0 commit comments