Permalink
Browse files

Use Buildyard-generated FindPackages

  • Loading branch information...
1 parent 34ac477 commit 0110556b7313c5e80693c8a927bd2ac9e17d79ac @eile eile committed Aug 8, 2012
Showing with 110 additions and 45 deletions.
  1. +90 −0 CMake/FindPackages.cmake
  2. +13 −2 CMake/configure.cmake
  3. +3 −40 CMakeLists.txt
  4. +4 −3 examples/CMakeLists.txt
View
@@ -0,0 +1,90 @@
+# generated by Buildyard, do not edit.
+
+find_package(VMMLIB 1.5.0 REQUIRED)
+if(VMMLIB_FOUND)
+ set(VMMLIB_name VMMLIB)
+elseif(VMMLIB_FOUND)
+ set(VMMLIB_name VMMLIB)
+endif()
+if(VMMLIB_name)
+ link_directories(${${VMMLIB_name}_LIBRARY_DIRS})
+ include_directories(${${VMMLIB_name}_INCLUDE_DIRS})
+endif()
+
+find_package(Lunchbox 1.5.0 REQUIRED)
+if(Lunchbox_FOUND)
+ set(Lunchbox_name Lunchbox)
+elseif(LUNCHBOX_FOUND)
+ set(Lunchbox_name LUNCHBOX)
+endif()
+if(Lunchbox_name)
+ link_directories(${${Lunchbox_name}_LIBRARY_DIRS})
+ include_directories(${${Lunchbox_name}_INCLUDE_DIRS})
+endif()
+
+find_package(Collage 0.7.0 REQUIRED)
+if(Collage_FOUND)
+ set(Collage_name Collage)
+elseif(COLLAGE_FOUND)
+ set(Collage_name COLLAGE)
+endif()
+if(Collage_name)
+ link_directories(${${Collage_name}_LIBRARY_DIRS})
+ include_directories(${${Collage_name}_INCLUDE_DIRS})
+endif()
+
+find_package(OpenGL REQUIRED)
+if(OpenGL_FOUND)
+ set(OpenGL_name OpenGL)
+elseif(OPENGL_FOUND)
+ set(OpenGL_name OPENGL)
+endif()
+if(OpenGL_name)
+ link_directories(${${OpenGL_name}_LIBRARY_DIRS})
+ include_directories(${${OpenGL_name}_INCLUDE_DIRS})
+endif()
+
+find_package(Boost 1.41.0 REQUIRED system regex date_time serialization)
+if(Boost_FOUND)
+ set(Boost_name Boost)
+elseif(BOOST_FOUND)
+ set(Boost_name BOOST)
+endif()
+if(Boost_name)
+ link_directories(${${Boost_name}_LIBRARY_DIRS})
+ include_directories(${${Boost_name}_INCLUDE_DIRS})
+endif()
+
+find_package(gpusd 1.5.0)
+if(gpusd_FOUND)
+ set(gpusd_name gpusd)
+elseif(GPUSD_FOUND)
+ set(gpusd_name GPUSD)
+endif()
+if(gpusd_name)
+ link_directories(${${gpusd_name}_LIBRARY_DIRS})
+ include_directories(${${gpusd_name}_INCLUDE_DIRS})
+endif()
+
+find_package(HWLOC 1.4.0)
+if(HWLOC_FOUND)
+ set(HWLOC_name HWLOC)
+elseif(HWLOC_FOUND)
+ set(HWLOC_name HWLOC)
+endif()
+if(HWLOC_name)
+ link_directories(${${HWLOC_name}_LIBRARY_DIRS})
+ include_directories(${${HWLOC_name}_INCLUDE_DIRS})
+endif()
+
+find_package(GLStats 0.9.0)
+if(GLStats_FOUND)
+ set(GLStats_name GLStats)
+elseif(GLSTATS_FOUND)
+ set(GLStats_name GLSTATS)
+endif()
+if(GLStats_name)
+ link_directories(${${GLStats_name}_LIBRARY_DIRS})
+ include_directories(${${GLStats_name}_INCLUDE_DIRS})
+endif()
+
View
@@ -5,8 +5,19 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(LINUX TRUE)
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
-find_package(OpenGL REQUIRED)
-find_package(Collage 0.7.0 REQUIRED)
+if(APPLE)
+ # WAR otherwise MacPorts X11 (/opt/local) is preferred
+ LIST(REMOVE_ITEM CMAKE_SYSTEM_LIBRARY_PATH /opt/local/lib)
+ LIST(REMOVE_ITEM CMAKE_SYSTEM_PREFIX_PATH /opt/local)
+endif()
+
+include(FindPackages)
+
+if(APPLE)
+ LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /opt/local/lib)
+ LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /opt/local)
+endif(APPLE)
+
find_package(GLEW_MX)
include_directories(${COLLAGE_INCLUDE_DIRS})
View
@@ -5,8 +5,6 @@
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)
project(Equalizer)
-option(EQUALIZER_USE_GPUSD "Test for GPU-SD support" ON)
-option(EQUALIZER_USE_HWLOC "Test for hwloc support" ON)
option(EQUALIZER_USE_MAGELLAN "Test for SpaceMouse support" ON)
option(EQUALIZER_BUILD_EXAMPLES "Build Equalizer examples." ON)
option(EQUALIZER_INSTALL_SERVER_HEADERS "Install Equalizer server includes." OFF)
@@ -42,13 +40,12 @@ endif()
include(Common)
include(GitTargets)
-include_directories(BEFORE ${CMAKE_SOURCE_DIR}/libs)
+include(configure)
-if(EQUALIZER_USE_GPUSD)
- find_package(gpusd 1.5.0)
-endif()
+include_directories(BEFORE ${CMAKE_SOURCE_DIR}/libs)
find_package(Doxygen)
+
if(DOXYGEN_FOUND)
set (ALL_TARGETS "")
macro(add_executable _target)
@@ -57,7 +54,6 @@ if(DOXYGEN_FOUND)
endmacro()
endif()
-include(configure)
include(UpdateFile)
include(TestBigEndian)
test_big_endian(EQ_BIG_ENDIAN)
@@ -68,51 +64,18 @@ if(MSVC)
include(UseGnuWin32)
endif(MSVC)
-find_package(VMMLIB REQUIRED)
-include_directories(SYSTEM ${VMMLIB_INCLUDE_DIRS})
-
-find_package(Boost 1.41 REQUIRED system regex date_time serialization)
-include_directories(AFTER SYSTEM ${Boost_INCLUDE_DIRS})
-
set(PTHREAD_LIBRARIES pthread)
-link_directories(${LUNCHBOX_LIBRARY_DIRS}) # need path to pthread.lib on Windows
if(LUNCHBOX_USE_OPENMP)
find_package(OpenMP REQUIRED)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
-find_package(OFED)
-if(OFED_FOUND)
- set(EQ_FEATURES "${EQ_FEATURES} RDMA")
-endif()
-
-find_package(UDT)
-if(UDT_FOUND)
- set(EQ_FEATURES "${EQ_FEATURES} UDT")
-endif()
-
-if(EQUALIZER_USE_HWLOC)
- find_package(HWLOC)
-endif()
if(HWLOC_FOUND)
set(EQ_FEATURES "${EQ_FEATURES} HWLOC")
endif()
-if(APPLE)
- # WAR otherwise MacPorts X11 (/opt/local) is preferred
- LIST(REMOVE_ITEM CMAKE_SYSTEM_LIBRARY_PATH /opt/local/lib)
- LIST(REMOVE_ITEM CMAKE_SYSTEM_PREFIX_PATH /opt/local)
-endif()
-
-find_package(X11)
-
-if(APPLE)
- LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /opt/local/lib)
- LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /opt/local)
-endif(APPLE)
-
if(X11_FOUND)
if(APPLE)
set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ") # Disabled by GNU.cmake!?
View
@@ -86,11 +86,12 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt
DESTINATION share/Equalizer/examples COMPONENT examples)
install(DIRECTORY include DESTINATION share/Equalizer/examples
COMPONENT examples)
-install(FILES ${CMAKE_SOURCE_DIR}/CMake/ParseArguments.cmake
+install(FILES ${CMAKE_SOURCE_DIR}/CMake/EqStringifyShaders.cmake
+ ${CMAKE_SOURCE_DIR}/CMake/FindGLEW_MX.cmake
+ ${CMAKE_SOURCE_DIR}/CMake/FindPackages.cmake
${CMAKE_SOURCE_DIR}/CMake/PurpleExpandLibraries.cmake
- ${CMAKE_SOURCE_DIR}/CMake/EqStringifyShaders.cmake
${CMAKE_SOURCE_DIR}/CMake/configure.cmake
- ${CMAKE_SOURCE_DIR}/CMake/FindGLEW_MX.cmake
+ ${CMAKE_SOURCE_DIR}/CMake/ParseArguments.cmake
DESTINATION share/Equalizer/examples/CMake COMPONENT examples)
if(CUDA_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/eqNBody")

0 comments on commit 0110556

Please sign in to comment.