Bläddra i källkod

Fix cmake when CMAKE_SIZEOF_VOID_P udnefined

The cmake build emits errors similar to here: [1] when
the CMAKE_SIZEOF_VOID_P variable is not defined. Not sure
why it's not defined in some cases, but this is an easy fix.

    CMake Error at CMakeLists.txt:77 (if):

        if given arguments:

        [...........]

    Unknown arguments specified

[1] https://stackoverflow.com/a/39733128
Stefan Codrescu 5 år sedan
förälder
incheckning
bdcc5623a6
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      cmake/FindWinSock.cmake

+ 1 - 1
cmake/FindWinSock.cmake

@@ -74,7 +74,7 @@ if(MINGW)
     list(APPEND WINSOCK_LIBRARY_PATHS "${CMAKE_MATCH_1}")
   endif()
 endif()
-if (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "AMD64" AND ${CMAKE_SIZEOF_VOID_P} EQUAL 4)
+if (${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "AMD64" AND "${CMAKE_SIZEOF_VOID_P}" EQUAL 4)
   list(APPEND WINSOCK_LIBRARY_PATHS "C:/Windows/SysWOW64")
 endif()
 list(APPEND WINSOCK_LIBRARY_PATHS "C:/Windows/System32")