cmake : Define library suffix in case of 64 bits multilib archs in linux
[contrib/upm.git] / CMakeLists.txt
index 2f4cc34..c8cf4f7 100644 (file)
@@ -8,19 +8,23 @@ endif ()
 
 find_package (Threads REQUIRED)
 find_package (PkgConfig REQUIRED)
-# force the libmaa version to be the required version
-pkg_check_modules (MAA REQUIRED maa>=0.2.9)
-message (INFO " found libmaa version: ${MAA_VERSION}")
+# force the libmraa version to be the required version
+pkg_check_modules (MRAA REQUIRED mraa>=0.4.0)
+message (INFO " found libmraa version: ${MRAA_VERSION}")
 
 # Appends the cmake/modules path to MAKE_MODULE_PATH variable.
 set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
+set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Installation path for libraries")
+
+# Set CMAKE_LIB_INSTALL_DIR if not defined
+include(GNUInstallDirs)
 
 # Make a version file containing the current version from git.
 include (GetGitRevisionDescription)
 git_describe (VERSION "--tags")
 if ("x_${VERSION}" STREQUAL "x_GIT-NOTFOUND")
-  message (WARNING " - Install git to compile a production libmaa!")
-  set (VERSION "v0.1.2-dirty")
+  message (WARNING " - Install git to compile a production libmraa!")
+  set (VERSION "v0.1.8-dirty")
 endif ()
 
 message (INFO " - UPM Version ${VERSION}")
@@ -81,7 +85,7 @@ if (IPK)
   set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
   set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${DETECTED_ARCH})
   set(CPACK_SYSTEM_NAME ${DETECTED_ARCH})
-  set(CPACK_DEBIAN_PACKAGE_DEPENDS "libmaa0 (>= ${MAA_VERSION})")
+  set(CPACK_DEBIAN_PACKAGE_DEPENDS "libmraa0 (>= ${MRAA_VERSION})")
   set(CPACK_DEBIAN_PACKAGE_PROVIDES "upm-dev, upm-dbg, upm-doc")
   set(CPACK_DEBIAN_PACKAGE_REPLACES ${CPACK_DEBIAN_PACKAGE_PROVIDES})
   set(CPACK_DEBIAN_PACKAGE_CONFLICTS ${CPACK_DEBIAN_PACKAGE_PROVIDES})