[llvm-commits] [llvm] r57945 - in /llvm/trunk: CMakeLists.txt cmake/modules/AddLLVM.cmake cmake/modules/AddPartiallyLinkedObject.cmake tools/llvm-config/CMakeLists.txt
Oscar Fuentes
ofv at wanadoo.es
Tue Oct 21 19:56:07 PDT 2008
Author: ofv
Date: Tue Oct 21 21:56:07 2008
New Revision: 57945
URL: http://llvm.org/viewvc/llvm-project?rev=57945&view=rev
Log:
CMake: `make install' for libraries, executables and header files.
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/cmake/modules/AddLLVM.cmake
llvm/trunk/cmake/modules/AddPartiallyLinkedObject.cmake
llvm/trunk/tools/llvm-config/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=57945&r1=57944&r2=57945&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Tue Oct 21 21:56:07 2008
@@ -157,3 +157,16 @@
add_subdirectory(tools)
add_subdirectory(examples)
+
+install(DIRECTORY include
+ DESTINATION .
+ PATTERN ".svn" EXCLUDE
+ PATTERN "*.cmake" EXCLUDE
+ PATTERN "*.in" EXCLUDE
+ )
+
+install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include
+ DESTINATION .
+ )
+
+# TODO: make and install documentation.
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=57945&r1=57944&r2=57945&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Tue Oct 21 21:56:07 2008
@@ -7,6 +7,9 @@
if( LLVM_COMMON_DEPENDS )
add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
endif( LLVM_COMMON_DEPENDS )
+ install(TARGETS ${name}
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
endmacro(add_llvm_library name)
@@ -34,12 +37,16 @@
macro(add_llvm_tool name)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR})
add_llvm_executable(${name} ${ARGN})
+ install(TARGETS ${name}
+ RUNTIME DESTINATION bin)
endmacro(add_llvm_tool name)
macro(add_llvm_example name)
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_EXAMPLES_BINARY_DIR})
add_llvm_executable(${name} ${ARGN})
+ install(TARGETS ${name}
+ RUNTIME DESTINATION examples)
endmacro(add_llvm_example name)
Modified: llvm/trunk/cmake/modules/AddPartiallyLinkedObject.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddPartiallyLinkedObject.cmake?rev=57945&r1=57944&r2=57945&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddPartiallyLinkedObject.cmake (original)
+++ llvm/trunk/cmake/modules/AddPartiallyLinkedObject.cmake Tue Oct 21 21:56:07 2008
@@ -32,4 +32,6 @@
set( llvm_libs ${llvm_libs} ${pll} PARENT_SCOPE)
set( llvm_lib_targets ${llvm_lib_targets} ${tnplo} PARENT_SCOPE )
endif( MSVC )
+ install(FILES ${pll}
+ DESTINATION lib)
endmacro(add_partially_linked_object lib)
Modified: llvm/trunk/tools/llvm-config/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/CMakeLists.txt?rev=57945&r1=57944&r2=57945&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-config/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-config/CMakeLists.txt Tue Oct 21 21:56:07 2008
@@ -104,3 +104,8 @@
DEPENDS ${LLVM_CONFIG})
add_dependencies(llvm-config.target ${llvm_lib_targets})
+
+install(FILES ${LLVM_CONFIG}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
+ WORLD_READ WORLD_EXECUTE
+ DESTINATION bin)
More information about the llvm-commits
mailing list