[asl] 31/177: Fixing installation paths

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Aug 27 09:22:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository asl.

commit 797f368f0e42b1ccdc2cbef9e9ae847205068e09
Author: AvtechScientific <AvtechScientific at users.noreply.github.com>
Date:   Mon Jun 15 13:08:16 2015 +0300

    Fixing installation paths
---
 CMakeLists.txt              |  8 ++------
 DefineFunctions.cmake       |  8 ++++----
 DefineOptions.cmake         |  5 ++---
 doc/CMakeLists.txt          | 11 +++++++++++
 test/testACL/CMakeLists.txt |  8 +++++---
 5 files changed, 24 insertions(+), 16 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a389cf..11bcda2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,12 +21,7 @@ endif()
 # Add definitions
 include(DefineOptions.cmake)
 include(DefineFunctions.cmake)
-
-# Configure Doxyfile
-configure_file(
-	"${PROJECT_SOURCE_DIR}/doc/Developer-Guide/Doxyfile.in"
-	"${PROJECT_BINARY_DIR}/doc/Developer-Guide/Doxyfile"
-)
+include(GNUInstallDirs)
 
 # Enable supplied cmake Modules
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
@@ -42,6 +37,7 @@ include_directories(SYSTEM ${OpenCL_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
 
 add_subdirectory(src)
 add_subdirectory(test)
+add_subdirectory(doc)
 
 # Packaging
 set(CPACK_GENERATOR "TGZ")
diff --git a/DefineFunctions.cmake b/DefineFunctions.cmake
index fabfa27..89be836 100644
--- a/DefineFunctions.cmake
+++ b/DefineFunctions.cmake
@@ -4,9 +4,9 @@ function(INSTALL_SUBLIB _SUBLIB _SUBLIB_PUBLIC_HEADERS)
 	# ToDo: add COMPONENT headers
 	install(TARGETS
 		${_SUBLIB}
-		RUNTIME DESTINATION bin
-		LIBRARY DESTINATION lib${LIB_SUFFIX}
-		ARCHIVE DESTINATION lib${LIB_SUFFIX}
+		RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+		LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+		ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
 	)
 
 	# Install public headers preserving the source tree structure
@@ -19,7 +19,7 @@ function(INSTALL_SUBLIB _SUBLIB _SUBLIB_PUBLIC_HEADERS)
 		install(FILES
 			${header}
 			DESTINATION
-			include/asl/${directories}
+			${CMAKE_INSTALL_INCLUDEDIR}/asl/${directories}
 		)
 	endforeach()
 endfunction(INSTALL_SUBLIB)
diff --git a/DefineOptions.cmake b/DefineOptions.cmake
index 1878a4c..9cd150b 100644
--- a/DefineOptions.cmake
+++ b/DefineOptions.cmake
@@ -1,7 +1,6 @@
 option(BUILD_SHARED_LIBS "Build shared libraries" ON)
-option(WITH_MATIO "Build with MATIO (Matlab) support" OFF)
-option(LIB_SUFFIX "Library suffix")
-option(WITH_INTERNAL_DOC "Compile doxygen internal documentation" OFF)
+option(WITH_MATIO "Build with MATIO (Matlab) support" ON)
+option(WITH_INTERNAL_DOC "Compile doxygen internal documentation" ON)
 option(WITH_TESTING "Build with unit tests" OFF)
 
 
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 0000000..c55d182
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1,11 @@
+if (WITH_INTERNAL_DOC)
+	find_package(Doxygen REQUIRED)
+	# Configure Doxyfile
+	configure_file(
+		"${PROJECT_SOURCE_DIR}/doc/Developer-Guide/Doxyfile.in"
+		"${PROJECT_BINARY_DIR}/doc/Developer-Guide/Doxyfile"
+	)
+	add_custom_target(docs ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/doc/Developer-Guide/Doxyfile)
+	install(CODE "execute_process(COMMAND ${CMAKE_BUILD_TOOL} docs)")
+	install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/html DESTINATION ${CMAKE_INSTALL_DOCDIR})
+endif()
diff --git a/test/testACL/CMakeLists.txt b/test/testACL/CMakeLists.txt
index 56bc20b..39eb4e2 100644
--- a/test/testACL/CMakeLists.txt
+++ b/test/testACL/CMakeLists.txt
@@ -1,5 +1,10 @@
 include_directories(${CMAKE_SOURCE_DIR}/src)
 
+# Install asl-hardware
+add_executable(asl-hardware testHardware.cc)
+target_link_libraries(asl-hardware aslacl)
+install(TARGETS asl-hardware RUNTIME DESTINATION  ${CMAKE_INSTALL_BINDIR})
+
 add_executable(testVectorOfElements testVectorOfElements.cc)
 target_link_libraries(testVectorOfElements aslacl)
 
@@ -12,9 +17,6 @@ target_link_libraries(testPerformance aslacl)
 add_executable(testKernel testKernel.cc)
 target_link_libraries(testKernel aslacl)
 
-add_executable(testHardware testHardware.cc)
-target_link_libraries(testHardware aslacl)
-
 add_executable(testOperators testOperators.cc)
 target_link_libraries(testOperators aslacl)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/asl.git



More information about the debian-science-commits mailing list