File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.20 FATAL_ERROR)
22
3+ # Disable the CMP0002 policy error by setting it to OLD
4+ # if(POLICY CMP0002)
5+ # cmake_policy(SET CMP0002 OLD)
6+ # endif()
7+
38project ("SpaceCheckers" VERSION 1.0.10
49 HOMEPAGE_URL "https://github.com/Longwater1234/space-checkers" )
510
Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ if(ixwebsocket_ADDED)
2525 target_link_libraries (ixwebsocket PUBLIC ${CMAKE_THREAD_LIBS_INIT} )
2626 endif ()
2727
28- if (TARGET zlib )
28+ if (TARGET zlibstatic )
2929 message (STATUS "ixwebsocket: zlib support enabled" )
3030 target_compile_definitions (ixwebsocket PRIVATE IXWEBSOCKET_USE_ZLIB)
31- target_link_libraries (ixwebsocket PRIVATE zlib )
31+ target_link_libraries (ixwebsocket PRIVATE zlibstatic )
3232 else ()
3333 message (STATUS "ixwebsocket: zlib support disabled (include zlib first)" )
3434 endif ()
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ CPMAddPackage(
99)
1010
1111if (zlib_ADDED)
12- add_library (zlib STATIC
12+ add_library (zlibstatic STATIC
1313 ${zlib_SOURCE_DIR} /adler32.c
1414 ${zlib_SOURCE_DIR} /compress.c
1515 ${zlib_SOURCE_DIR} /crc32.c
@@ -30,11 +30,11 @@ if(zlib_ADDED)
3030 include (CheckIncludeFile)
3131 check_include_file(unistd.h Z_HAVE_UNISTD_H)
3232 if (Z_HAVE_UNISTD_H)
33- target_compile_definitions (zlib PRIVATE Z_HAVE_UNISTD_H)
33+ target_compile_definitions (zlibstatic PRIVATE Z_HAVE_UNISTD_H)
3434 endif ()
3535
3636 if (MSVC )
37- target_compile_definitions (zlib PRIVATE _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE)
37+ target_compile_definitions (zlibstatic PRIVATE _CRT_SECURE_NO_DEPRECATE _CRT_NONSTDC_NO_DEPRECATE)
3838 endif ()
39- target_include_directories (zlib PUBLIC ${zlib_SOURCE_DIR} )
39+ target_include_directories (zlibstatic PUBLIC ${zlib_SOURCE_DIR} )
4040endif ()
You can’t perform that action at this time.
0 commit comments