]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Use PCAP_ROOT to tell CMake where to find Npcap or WinPcap.
authorGuy Harris <[email protected]>
Wed, 30 Oct 2019 01:45:43 +0000 (18:45 -0700)
committerGuy Harris <[email protected]>
Wed, 30 Oct 2019 01:45:43 +0000 (18:45 -0700)
.appveyor.yml
CMakeLists.txt

index df5a323c0b4777d4d397f6e91d6f3a77547f919b..80b18be2cefd35e51530081ddf9d68d37d6b2b63 100644 (file)
@@ -45,5 +45,5 @@ build_script:
   - type NUL >.devel
   - md build
   - cd build
-  - cmake -DCMAKE_PREFIX_PATH=c:\projects\libpcap\Win32\%SDK% -G"%GENERATOR%" ..
+  - cmake -DPCAP_ROOT=c:\projects\libpcap\Win32\%SDK% -G"%GENERATOR%" ..
   - msbuild /m /nologo /p:Configuration=Release tcpdump.sln
index 5768db5e2a2bad8c932897ce5a77965f0155d335..3f9dd8362337221de94b1d092e3cf5123b1383e8 100644 (file)
@@ -1,5 +1,14 @@
 cmake_minimum_required(VERSION 2.8.6)
 
+#
+# We want find_path() and find_library() to honor {packagename}_ROOT,
+# as that appears to be the standard way to say "hey, look here for
+# this package" from the command line.
+#
+if(POLICY CMP0074)
+    cmake_policy(SET CMP0074 NEW)
+endif()
+
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
 
 project(tcpdump)