micmacIGN / micmac

Free open-source photogrammetry software tools
http://micmac.ensg.eu
Other
685 stars 150 forks source link

Lib X11 not found in macOS (solution proposed) #235

Open jfvilleforceix opened 9 months ago

jfvilleforceix commented 9 months ago

Hello, When compiling MMVII in macOS I encountered following problem :

[100%] Linking CXX executable ../bin/MMVII
ld: library not found for -lX11
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I think it's because X11 is not installed in a classic folder under macOS so I modified the CMakeLists.txt at line 121 with :

if(UNIX)
  if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    set(mmv2_extlibs -lX11)
  else()
    set(mmv2_extlibs -lX11 -L/opt/X11/lib/)
  endif()
else()
  set(mmv2_extlibs)
endif()

if it is interesting for anyone else let me know.