summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Novacek <rnovacek@redhat.com>2013-05-30 11:26:01 +0200
committerRadek Novacek <rnovacek@redhat.com>2013-06-17 09:36:01 +0200
commit1efc7f7cf9a3c16c4a1d72142d3da7b6295437e1 (patch)
treeb0efdf28629dc5b3994bd3b5b9a73f4e43f13103
parent0f1835e72fb4809391f50c55a259b3dc68f2065f (diff)
downloadopenlmi-providers-1efc7f7cf9a3c16c4a1d72142d3da7b6295437e1.tar.gz
openlmi-providers-1efc7f7cf9a3c16c4a1d72142d3da7b6295437e1.tar.xz
openlmi-providers-1efc7f7cf9a3c16c4a1d72142d3da7b6295437e1.zip
Add FindOpenLMIIndManager cmake module
-rw-r--r--CMakeLists.txt1
-rw-r--r--cmake/modules/FindOpenLMIIndManager.cmake21
-rw-r--r--openlmi-providers.spec1
3 files changed, 23 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c5a5c7c..834ffa5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,3 +44,4 @@ install(FILES cmake/modules/OpenLMIMacros.cmake DESTINATION share/cmake/Modules)
install(FILES cmake/modules/FindCMPI.cmake DESTINATION share/cmake/Modules)
install(FILES cmake/modules/FindKonkretCMPI.cmake DESTINATION share/cmake/Modules)
install(FILES cmake/modules/FindOpenLMI.cmake DESTINATION share/cmake/Modules)
+install(FILES cmake/modules/FindOpenLMIIndManager.cmake DESTINATION share/cmake/Modules)
diff --git a/cmake/modules/FindOpenLMIIndManager.cmake b/cmake/modules/FindOpenLMIIndManager.cmake
new file mode 100644
index 0000000..ba79199
--- /dev/null
+++ b/cmake/modules/FindOpenLMIIndManager.cmake
@@ -0,0 +1,21 @@
+
+find_path(OPENLMI_IND_MANAGER_INCLUDE_DIR
+ NAMES ind_manager.h
+ HINTS $ENV{OPENLMI_IND_MANAGER_INCLUDE_DIR}
+ PATH_SUFFIXES include/openlmi
+ PATHS /usr /usr/local
+)
+
+find_library(OPENLMI_IND_MANAGER_LIBRARY
+ NAMES openlmiindmanager
+ HINTS $ENV{OPENLMI_IND_MANAGER_LIB_DIR}
+ PATH_SUFFIXES lib64 lib
+ PATHS /usr /usr/local
+)
+
+set(OPENLMI_IND_MANAGER_LIBRARIES ${OPENLMI_IND_MANAGER_LIBRARY})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(OPENLMI_IND_MANAGER DEFAULT_MSG OPENLMI_IND_MANAGER_LIBRARIES OPENLMI_IND_MANAGER_INCLUDE_DIR)
+
+mark_as_advanced(OPENLMI_IND_MANAGER_INCLUDE_DIR OPENLMI_IND_MANAGER_LIBRARIES)
diff --git a/openlmi-providers.spec b/openlmi-providers.spec
index 6e75e6f..26a0ca8 100644
--- a/openlmi-providers.spec
+++ b/openlmi-providers.spec
@@ -229,6 +229,7 @@ cp mof/LMI_Software.reg $RPM_BUILD_ROOT/%{_datadir}/%{name}/
%{_datadir}/cmake/Modules/FindOpenLMI.cmake
%{_datadir}/cmake/Modules/FindCMPI.cmake
%{_datadir}/cmake/Modules/FindKonkretCMPI.cmake
+%{_datadir}/cmake/Modules/FindOpenLMIIndManager.cmake
%files -n openlmi-fan
%doc README COPYING