]> The Tcpdump Group git mirrors - libpcap/commitdiff
CMAKE_C_LIBRARY_ARCHITECTURE
authorB. Scott Michel <[email protected]>
Sun, 3 Nov 2019 22:33:18 +0000 (14:33 -0800)
committerB. Scott Michel <[email protected]>
Fri, 22 Nov 2019 17:40:58 +0000 (09:40 -0800)
Set CMAKE_C_LIBRARY_ARCHITECTURE for newer versions of CMake. The
CMAKE_LIBRARY_ARCHITECTURE is a meta-variable that is set from the
value of CMAKE_<LANG>_LIBRARY_ARCHITECTURE in at least 3.15 onward.

cmake/Modules/FindPacket.cmake

index 599cd11e6b20081ee4abbc491e954e2bd0a0b954..900c8e3fefbfc252c9416cf3f05a80c486bc69f9 100644 (file)
@@ -58,6 +58,12 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
   # without searching in the Lib directory first appears to be to set
   # CMAKE_LIBRARY_ARCHITECTURE to "x64".
   #
+  # In newer versions of CMake, CMAKE_LIBRARY_ARCHITECTURE is set according to
+  # the language, e.g., CMAKE_<LANG>_LIBRARY_ARCHITECTURE. So, set the new
+  # variable, CMAKE_C_LIBRARY_ARCHITECTURE, so that CMAKE_LIBRARY_ARCHITECTURE
+  # inherits the correct value.
+  #
+  set(CMAKE_C_LIBRARY_ARCHITECTURE "x64")
   set(CMAKE_LIBRARY_ARCHITECTURE "x64")
 endif()