LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File set_system_path.patch of Package libArcus (Project home:emendonca:octoprint)

--- CMakeLists.txt-orig	2015-09-18 08:41:38.000000000 -0300
+++ CMakeLists.txt	2017-08-22 17:04:32.070927672 -0300
@@ -70,32 +70,48 @@
     add_subdirectory(examples)
 endif()
 
+if(LIB64)
+    set(LIBSUFFIX 64)
+else()
+    set(LIBSUFFIX "")
+endif()
+
+set(INSTALL_LIB_DIR     lib${LIBSUFFIX} CACHE PATH "Installation directory for libraries")
+mark_as_advanced(INSTALL_LIB_DIR)
+
 install(TARGETS Arcus
     EXPORT Arcus-targets
     RUNTIME DESTINATION bin
-    LIBRARY DESTINATION lib
-    ARCHIVE DESTINATION lib
+    LIBRARY DESTINATION ${INSTALL_LIB_DIR}
+    ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
     PUBLIC_HEADER DESTINATION include/Arcus
 )
 
 install(EXPORT Arcus-targets
-    DESTINATION lib/cmake/Arcus
+    DESTINATION ${INSTALL_LIB_DIR}/cmake/Arcus
 )
 
-configure_package_config_file(ArcusConfig.cmake.in ${CMAKE_BINARY_DIR}/ArcusConfig.cmake INSTALL_DESTINATION lib/cmake/Arcus)
+configure_package_config_file(ArcusConfig.cmake.in ${CMAKE_BINARY_DIR}/ArcusConfig.cmake INSTALL_DESTINATION ${INSTALL_LIB_DIR}/cmake/Arcus)
 write_basic_package_version_file(${CMAKE_BINARY_DIR}/ArcusConfigVersion.cmake VERSION ${ARCUS_VERSION} COMPATIBILITY SameMajorVersion)
 
 install(FILES
     ${CMAKE_BINARY_DIR}/ArcusConfig.cmake
     ${CMAKE_BINARY_DIR}/ArcusConfigVersion.cmake
-    DESTINATION lib/cmake/Arcus
+    DESTINATION ${INSTALL_LIB_DIR}/cmake/Arcus
 )
 
 if(INSTALL_PYTHON_PACKAGE)
+    if(PYTHON_DESTDIR)
+	set(PYTHON_INSTALL_DIR ${PYTHON_DESTDIR})
+    else()
+	set(PYTHON_INSTALL_DIR "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages")
+    endif()
+    mark_as_advanced(PYTHON_INSTALL_DIR)
+
     if(APPLE OR WIN32)
         install(FILES python/Arcus/__init__.py DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/Arcus)
     else()
-        install(FILES python/Arcus/__init__.py DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages/Arcus)
+        install(FILES python/Arcus/__init__.py DESTINATION ${PYTHON_DESTDIR}/Arcus)
     endif()
 endif()