aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt15
-rw-r--r--cmake/modules/UseWinLibs.cmake16
2 files changed, 10 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18145188a7..9baa26538d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -174,7 +174,6 @@ if(NOT CMAKE_INSTALL_RPATH AND NOT (WIN32 OR APPLE))
endif()
endif()
-
if(WIN32)
# Linking with wsetargv.obj enables "wildcard expansion" of
# command-line arguments.
@@ -1054,9 +1053,6 @@ foreach(PACKAGE ${PACKAGELIST})
endif()
endforeach()
-# Provide Windows system lib names
-include( UseWinLibs )
-
# dist target that prepares source dir
# XXX Duplicated in the RPM section below.
add_custom_target(dist
@@ -1064,7 +1060,6 @@ add_custom_target(dist
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
-
if(HAVE_LIBAIRPCAP)
set(HAVE_AIRPCAP 1)
endif()
@@ -1195,6 +1190,16 @@ if(ENABLE_CHECKHF_CONFLICT)
set(ENABLE_CHECK_FILTER 1)
endif()
+#
+# Platform-specific additional libraries.
+#
+if(WIN32)
+ set(WIN_PSAPI_LIBRARY psapi.lib)
+ set(WIN_WSOCK32_LIBRARY wsock32.lib)
+ set(WIN_COMCTL32_LIBRARY comctl32.lib )
+ set(WIN_VERSION_LIBRARY version.lib)
+endif()
+
if(APPLE)
#
# We assume that APPLE means macOS so that we have the macOS
diff --git a/cmake/modules/UseWinLibs.cmake b/cmake/modules/UseWinLibs.cmake
deleted file mode 100644
index 9f6135d60a..0000000000
--- a/cmake/modules/UseWinLibs.cmake
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-
-# Right now this is a more or less inelegant hack to get Windows
-# builds going with MSVC
-
-if( WIN32 )
-
- # We might need something like "if (CMAKE_COMPILER_ID MATCHES "MSVC")"
- # here to support other compilers on Windows.
-
- set( WIN_PSAPI_LIBRARY psapi.lib )
- set( WIN_WSOCK32_LIBRARY wsock32.lib )
- set( WIN_COMCTL32_LIBRARY comctl32.lib )
- set( WIN_VERSION_LIBRARY version.lib )
-
-endif()