aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake/CopyWinLibs.cmake
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/cmake/CopyWinLibs.cmake155
1 files changed, 155 insertions, 0 deletions
diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake
new file mode 100644
index 0000000..345761a
--- /dev/null
+++ b/linden/indra/cmake/CopyWinLibs.cmake
@@ -0,0 +1,155 @@
1# -*- cmake -*-
2
3# The copy_win_libs folder contains file lists and a script used to
4# copy dlls, exes and such needed to run the SecondLife from within
5# VisualStudio.
6
7include(CMakeCopyIfDifferent)
8
9set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32")
10set(vivox_files
11 tntk.dll
12 libeay32.dll
13 SLVoice.exe
14 ssleay32.dll
15 SLVoiceAgent.exe
16 srtp.dll
17 alut.dll
18 vivoxsdk.dll
19 ortp.dll
20 wrap_oal.dll
21 )
22
23set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
24set(debug_files
25 freebl3.dll
26 gksvggdiplus.dll
27 js3250.dll
28 nspr4.dll
29 nss3.dll
30 nssckbi.dll
31 plc4.dll
32 plds4.dll
33 smime3.dll
34 softokn3.dll
35 ssl3.dll
36 xpcom.dll
37 xul.dll
38 openjpegd.dll
39 windbgdlg.exe
40 )
41
42copy_if_different(
43 ${debug_src_dir}
44 "${CMAKE_CURRENT_BINARY_DIR}/Debug"
45 out_targets
46 ${debug_files}
47 )
48set(all_targets ${all_targets} ${out_targets})
49
50copy_if_different(
51 ${vivox_src_dir}
52 "${CMAKE_CURRENT_BINARY_DIR}/Debug"
53 out_targets
54 ${vivox_files}
55 )
56set(all_targets ${all_targets} ${out_targets})
57
58set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
59set(release_files
60 freebl3.dll
61 gksvggdiplus.dll
62 js3250.dll
63 nspr4.dll
64 nss3.dll
65 nssckbi.dll
66 plc4.dll
67 plds4.dll
68 smime3.dll
69 softokn3.dll
70 ssl3.dll
71 xpcom.dll
72 xul.dll
73 openjpeg.dll
74 )
75
76copy_if_different(
77 ${release_src_dir}
78 "${CMAKE_CURRENT_BINARY_DIR}/Release"
79 out_targets
80 ${release_files}
81 )
82set(all_targets ${all_targets} ${out_targets})
83
84copy_if_different(
85 ${vivox_src_dir}
86 "${CMAKE_CURRENT_BINARY_DIR}/Release"
87 out_targets
88 ${vivox_files}
89 )
90set(all_targets ${all_targets} ${out_targets})
91
92copy_if_different(
93 ${release_src_dir}
94 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
95 out_targets
96 ${release_files}
97 )
98set(all_targets ${all_targets} ${out_targets})
99
100copy_if_different(
101 ${vivox_src_dir}
102 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
103 out_targets
104 ${vivox_files}
105 )
106set(all_targets ${all_targets} ${out_targets})
107
108set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
109if(EXISTS ${internal_llkdu_path})
110 set(internal_llkdu_src "${CMAKE_BINARY_DIR}/llkdu/${CMAKE_CFG_INTDIR}/llkdu.dll")
111 set(llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll")
112 ADD_CUSTOM_COMMAND(
113 OUTPUT ${llkdu_dst}
114 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${internal_llkdu_src} ${llkdu_dst}
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 )
138 set(all_targets ${all_targets} ${release_llkdu_dst})
139
140 set(relwithdebinfo_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llkdu.dll")
141 ADD_CUSTOM_COMMAND(
142 OUTPUT ${relwithdebinfo_llkdu_dst}
143 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst}
144 DEPENDS ${release_llkdu_src}
145 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
146 )
147 set(all_targets ${all_targets} ${relwithdebinfo_llkdu_dst})
148
149endif (EXISTS ${internal_llkdu_path})
150
151add_custom_target(copy_win_libs ALL DEPENDS ${all_targets})
152
153if(EXISTS ${internal_llkdu_path})
154 add_dependencies(copy_win_libs llkdu)
155endif(EXISTS ${internal_llkdu_path})