瀏覽代碼

Specify link library visibility

alex 2 年之前
父節點
當前提交
e16e91ffc9
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      CMakeLists.txt

+ 3 - 3
CMakeLists.txt

@@ -5,7 +5,7 @@ if (ENET_STATIC)
     add_library(enet STATIC test/library.c)
 
     if (WIN32)
-        target_link_libraries(enet winmm ws2_32)
+        target_link_libraries(enet PUBLIC winmm ws2_32)
     endif()
 endif()
 
@@ -14,7 +14,7 @@ if (ENET_SHARED)
     add_library(enet SHARED test/library.c)
 
     if (WIN32)
-        target_link_libraries(enet winmm ws2_32)
+        target_link_libraries(enet PUBLIC winmm ws2_32)
     endif()
 endif()
 
@@ -22,7 +22,7 @@ if (ENET_TEST)
     add_executable(enet_test test/build.c)
 
     if (WIN32)
-        target_link_libraries(enet_test winmm ws2_32)
+        target_link_libraries(enet_test PUBLIC winmm ws2_32)
     endif()
 endif()