commit 2678b8a282724ba13c60691afb7653910bbc3db2
parent 445ec10d3408c7c6b15e0955bb6708a82232a453
Author: Hans Petter Selasky <[email protected]>
Date: Fri, 7 Oct 2016 13:31:27 +0200
Build fix for FreeBSD.
Use X11_Xpm_FOUND variable instead of custom HAS_XPM one.
The X11_Xpm_FOUND variable is defined by the X11
cmake package when XPM is present.
Signed-off-by: Hans Petter Selasky <[email protected]>
Diffstat:
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@@ -12,7 +12,6 @@ if(NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows"))
endif()
find_package(zlib REQUIRED)
find_package(X11)
-check_include_file(X11/xpm.h HAS_XPM)
find_package(Threads REQUIRED)
find_package(OSS)
find_package(Alsa)
@@ -335,7 +334,7 @@ if(FltkGui)
set(GUI_LIBRARIES zynaddsubfx_gui ${FLTK_LIBRARIES} ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES})
- if(X11_FOUND AND HAS_XPM)
+ if(X11_FOUND AND X11_Xpm_FOUND)
set(GUI_LIBRARIES ${GUI_LIBRARIES} ${X11_LIBRARIES} -lXpm)
endif()
@@ -359,7 +358,7 @@ if(NtkGui)
set(GUI_LIBRARIES zynaddsubfx_gui ${NTK_LIBRARIES} ${NTK_IMAGES_LIBRARIES} ${OPENGL_LIBRARIES})
- if(X11_FOUND AND HAS_XPM)
+ if(X11_FOUND AND X11_Xpm_FOUND)
set(GUI_LIBRARIES ${GUI_LIBRARIES} ${X11_LIBRARIES} -lXpm)
endif()
@@ -527,7 +526,7 @@ package_status(MXML_FOUND "mxml " "found" ${Red})
package_status(FFTW_FOUND "fftw3 " "found" ${Red})
package_status(LIBLO_FOUND "liblo " "found" ${Red})
package_status(X11_FOUND "x11 " "found" ${Yellow})
-package_status(HAS_XPM "xpm " "found" ${Yellow})
+package_status(X11_Xpm_FOUND "xpm " "found" ${Yellow})
package_status(FLTK_FOUND "fltk " "found" ${Yellow})
package_status(NTK_FOUND "ntk " "found" ${Yellow})
package_status(X11_FOUND "x11 " "found" ${Yellow})
diff --git a/src/UI/CMakeLists.txt b/src/UI/CMakeLists.txt
@@ -32,7 +32,7 @@ if(FltkGui)
add_executable(zynaddsubfx-ext-gui guimain.cpp)
target_link_libraries(zynaddsubfx-ext-gui zynaddsubfx_gui ${FLTK_LIBRARIES}
${FLTK_LIBRARIES} ${OPENGL_LIBRARIES} ${LIBLO_LIBRARIES} rtosc rtosc-cpp)
- if(X11_FOUND AND HAS_XPM)
+ if(X11_FOUND AND X11_Xpm_FOUND)
add_definitions(-DHAS_X11=1)
target_link_libraries(zynaddsubfx-ext-gui ${X11_LIBRARIES} -lXpm)
else()
@@ -43,7 +43,7 @@ elseif(NtkGui)
add_executable(zynaddsubfx-ext-gui guimain.cpp)
target_link_libraries(zynaddsubfx-ext-gui zynaddsubfx_gui ${NTK_LDFLAGS}
${OPENGL_LIBRARIES} ${LIBLO_LIBRARIES} rtosc rtosc-cpp)
- if(X11_FOUND AND HAS_XPM)
+ if(X11_FOUND AND X11_Xpm_FOUND)
add_definitions(-DHAS_X11=1)
target_link_libraries(zynaddsubfx-ext-gui ${X11_LIBRARIES} -lXpm)
else()