From ebedc4a781610540d295e87c4de59ed4e302f3c7 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Mon, 24 Sep 2018 05:53:30 +0500 Subject: [PATCH] Fix compilation on windows. --- cl_dll/CMakeLists.txt | 6 +++++- cl_dll/aghl/agbase64.cpp | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index 2903a3d3..a8ad8680 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -94,7 +94,7 @@ set (CLDLL_SOURCES message.cpp overview.cpp parsemsg.cpp -# aghl/agbase64.cpp + aghl/agbase64.cpp aghl/agcrc32.cpp aghl/agcrc32enforcer.cpp # aghl/agdownload.cpp @@ -164,6 +164,10 @@ if (GOLDSOURCE_SUPPORT) target_link_libraries( ${CLDLL_LIBRARY} ${CMAKE_DL_LIBS} ) endif() +if (WIN32) + target_link_libraries( ${CLDLL_LIBRARY} version.lib ) +endif() + set_target_properties (${CLDLL_LIBRARY} PROPERTIES POSITION_INDEPENDENT_CODE 1) diff --git a/cl_dll/aghl/agbase64.cpp b/cl_dll/aghl/agbase64.cpp index 27c7ec01..c54cbe28 100644 --- a/cl_dll/aghl/agbase64.cpp +++ b/cl_dll/aghl/agbase64.cpp @@ -1,5 +1,6 @@ //++ BulliT +#ifdef _WIN32 #include "agbase64.h" #include #include @@ -148,4 +149,5 @@ static char* s_szBadCodes[] = sprintf(szTest,"\"%s\", //%s\n",szBuff,s_szBadCodes[ix]); OutputDebugString(szTest); } -*/ \ No newline at end of file +*/ +#endif // _WIN32