aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/CopyWinLibs.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/cmake/CopyWinLibs.cmake')
-rw-r--r--linden/indra/cmake/CopyWinLibs.cmake106
1 files changed, 59 insertions, 47 deletions
diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake
index 345761a..3d70c8f 100644
--- a/linden/indra/cmake/CopyWinLibs.cmake
+++ b/linden/indra/cmake/CopyWinLibs.cmake
@@ -14,7 +14,6 @@ set(vivox_files
14 ssleay32.dll 14 ssleay32.dll
15 SLVoiceAgent.exe 15 SLVoiceAgent.exe
16 srtp.dll 16 srtp.dll
17 alut.dll
18 vivoxsdk.dll 17 vivoxsdk.dll
19 ortp.dll 18 ortp.dll
20 wrap_oal.dll 19 wrap_oal.dll
@@ -22,12 +21,15 @@ set(vivox_files
22 21
23set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") 22set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
24set(debug_files 23set(debug_files
24 alut.dll
25 freebl3.dll 25 freebl3.dll
26 gksvggdiplus.dll 26 gksvggdiplus.dll
27 js3250.dll 27 js3250.dll
28 nspr4.dll 28 nspr4.dll
29 nss3.dll 29 nss3.dll
30 nssckbi.dll 30 nssckbi.dll
31 openal32.dll
32 openjpegd.dll
31 plc4.dll 33 plc4.dll
32 plds4.dll 34 plds4.dll
33 smime3.dll 35 smime3.dll
@@ -35,7 +37,6 @@ set(debug_files
35 ssl3.dll 37 ssl3.dll
36 xpcom.dll 38 xpcom.dll
37 xul.dll 39 xul.dll
38 openjpegd.dll
39 windbgdlg.exe 40 windbgdlg.exe
40 ) 41 )
41 42
@@ -57,12 +58,15 @@ set(all_targets ${all_targets} ${out_targets})
57 58
58set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") 59set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
59set(release_files 60set(release_files
61 alut.dll
60 freebl3.dll 62 freebl3.dll
61 gksvggdiplus.dll 63 gksvggdiplus.dll
62 js3250.dll 64 js3250.dll
63 nspr4.dll 65 nspr4.dll
64 nss3.dll 66 nss3.dll
65 nssckbi.dll 67 nssckbi.dll
68 openal32.dll
69 openjpeg.dll
66 plc4.dll 70 plc4.dll
67 plds4.dll 71 plds4.dll
68 smime3.dll 72 smime3.dll
@@ -70,7 +74,6 @@ set(release_files
70 ssl3.dll 74 ssl3.dll
71 xpcom.dll 75 xpcom.dll
72 xul.dll 76 xul.dll
73 openjpeg.dll
74 ) 77 )
75 78
76copy_if_different( 79copy_if_different(
@@ -105,51 +108,60 @@ copy_if_different(
105 ) 108 )
106set(all_targets ${all_targets} ${out_targets}) 109set(all_targets ${all_targets} ${out_targets})
107 110
108set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu") 111
109if(EXISTS ${internal_llkdu_path}) 112# Copy MS C runtime dlls, required for packaging.
110 set(internal_llkdu_src "${CMAKE_BINARY_DIR}/llkdu/${CMAKE_CFG_INTDIR}/llkdu.dll") 113# *TODO - Adapt this to support VC9
111 set(llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll") 114if (MSVC80)
112 ADD_CUSTOM_COMMAND( 115 FIND_PATH(debug_msvc8_redist_path msvcr80d.dll
113 OUTPUT ${llkdu_dst} 116 PATHS
114 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${internal_llkdu_src} ${llkdu_dst} 117 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT
115 DEPENDS ${internal_llkdu_src}
116 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
117 )
118 set(all_targets ${all_targets} ${llkdu_dst})
119else(EXISTS ${internal_llkdu_path})
120 set(debug_llkdu_src "${debug_src_dir}/llkdu.dll")
121 set(debug_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Debug/llkdu.dll")
122 ADD_CUSTOM_COMMAND(
123 OUTPUT ${debug_llkdu_dst}
124 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst}
125 DEPENDS ${debug_llkdu_src}
126 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Debug"
127 )
128 set(all_targets ${all_targets} ${debug_llkdu_dst})
129
130 set(release_llkdu_src "${release_src_dir}/llkdu.dll")
131 set(release_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Release/llkdu.dll")
132 ADD_CUSTOM_COMMAND(
133 OUTPUT ${release_llkdu_dst}
134 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst}
135 DEPENDS ${release_llkdu_src}
136 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Release"
137 ) 118 )
138 set(all_targets ${all_targets} ${release_llkdu_dst}) 119
139 120 if(EXISTS ${debug_msvc8_redist_path})
140 set(relwithdebinfo_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llkdu.dll") 121 set(debug_msvc8_files
141 ADD_CUSTOM_COMMAND( 122 msvcr80d.dll
142 OUTPUT ${relwithdebinfo_llkdu_dst} 123 msvcp80d.dll
143 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst} 124 Microsoft.VC80.DebugCRT.manifest
144 DEPENDS ${release_llkdu_src} 125 )
145 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo" 126
127 copy_if_different(
128 ${debug_msvc8_redist_path}
129 "${CMAKE_CURRENT_BINARY_DIR}/Debug"
130 out_targets
131 ${debug_msvc8_files}
132 )
133 set(all_targets ${all_targets} ${out_targets})
134 endif (EXISTS ${debug_msvc8_redist_path})
135
136 FIND_PATH(release_msvc8_redist_path msvcr80.dll
137 PATHS
138 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC80.CRT
146 ) 139 )
147 set(all_targets ${all_targets} ${relwithdebinfo_llkdu_dst})
148
149endif (EXISTS ${internal_llkdu_path})
150 140
151add_custom_target(copy_win_libs ALL DEPENDS ${all_targets}) 141 if(EXISTS ${release_msvc8_redist_path})
142 set(release_msvc8_files
143 msvcr80.dll
144 msvcp80.dll
145 Microsoft.VC80.CRT.manifest
146 )
152 147
153if(EXISTS ${internal_llkdu_path}) 148 copy_if_different(
154 add_dependencies(copy_win_libs llkdu) 149 ${release_msvc8_redist_path}
155endif(EXISTS ${internal_llkdu_path}) 150 "${CMAKE_CURRENT_BINARY_DIR}/Release"
151 out_targets
152 ${release_msvc8_files}
153 )
154 set(all_targets ${all_targets} ${out_targets})
155
156 copy_if_different(
157 ${release_msvc8_redist_path}
158 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
159 out_targets
160 ${release_msvc8_files}
161 )
162 set(all_targets ${all_targets} ${out_targets})
163
164 endif (EXISTS ${release_msvc8_redist_path})
165endif (MSVC80)
166
167add_custom_target(copy_win_libs ALL DEPENDS ${all_targets})