llvm.org GIT mirror llvm / 1dc9716
CMake: `make install' for libraries, executables and header files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57945 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 10 years ago
4 changed file(s) with 27 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
156156 add_subdirectory(tools)
157157
158158 add_subdirectory(examples)
159
160 install(DIRECTORY include
161 DESTINATION .
162 PATTERN ".svn" EXCLUDE
163 PATTERN "*.cmake" EXCLUDE
164 PATTERN "*.in" EXCLUDE
165 )
166
167 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include
168 DESTINATION .
169 )
170
171 # TODO: make and install documentation.
66 if( LLVM_COMMON_DEPENDS )
77 add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
88 endif( LLVM_COMMON_DEPENDS )
9 install(TARGETS ${name}
10 LIBRARY DESTINATION lib
11 ARCHIVE DESTINATION lib)
912 endmacro(add_llvm_library name)
1013
1114
3336 macro(add_llvm_tool name)
3437 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_TOOLS_BINARY_DIR})
3538 add_llvm_executable(${name} ${ARGN})
39 install(TARGETS ${name}
40 RUNTIME DESTINATION bin)
3641 endmacro(add_llvm_tool name)
3742
3843
3944 macro(add_llvm_example name)
4045 # set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_EXAMPLES_BINARY_DIR})
4146 add_llvm_executable(${name} ${ARGN})
47 install(TARGETS ${name}
48 RUNTIME DESTINATION examples)
4249 endmacro(add_llvm_example name)
4350
4451
3131 set( llvm_libs ${llvm_libs} ${pll} PARENT_SCOPE)
3232 set( llvm_lib_targets ${llvm_lib_targets} ${tnplo} PARENT_SCOPE )
3333 endif( MSVC )
34 install(FILES ${pll}
35 DESTINATION lib)
3436 endmacro(add_partially_linked_object lib)
103103 DEPENDS ${LLVM_CONFIG})
104104
105105 add_dependencies(llvm-config.target ${llvm_lib_targets})
106
107 install(FILES ${LLVM_CONFIG}
108 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
109 WORLD_READ WORLD_EXECUTE
110 DESTINATION bin)