indra/cmake/CopyWinLibs.cmake

Thu, 14 Jul 2011 17:34:37 -0700

author
Tank_Master
date
Thu, 14 Jul 2011 17:34:37 -0700
changeset 1628
907de988cd77
parent 1074
92ab44e2e9f9
child 1636
893faacf26ea
permissions
-rw-r--r--

build with 2010 support (code changes still needed)

zwagoth@0 1 # -*- cmake -*-
zwagoth@0 2
zwagoth@0 3 # The copy_win_libs folder contains file lists and a script used to
zwagoth@0 4 # copy dlls, exes and such needed to run the SecondLife from within
zwagoth@0 5 # VisualStudio.
zwagoth@0 6
zwagoth@0 7 include(CMakeCopyIfDifferent)
Tank_Master@1628 8 # Provide compiler version awareness
Tank_Master@1628 9 if (MSVC71)
Tank_Master@1628 10 set(MSVC_DIR 7.1)
Tank_Master@1628 11 set(MSVC_SUFFIX 71)
Tank_Master@1628 12 elseif (MSVC80)
Tank_Master@1628 13 set(MSVC_DIR 8.0)
Tank_Master@1628 14 set(MSVC_SUFFIX 80)
Tank_Master@1628 15 elseif (MSVC90)
Tank_Master@1628 16 set(MSVC_DIR 9.0)
Tank_Master@1628 17 set(MSVC_SUFFIX 90)
Tank_Master@1628 18 elseif (MSVC10)
Tank_Master@1628 19 set(MSVC_DIR 10.0)
Tank_Master@1628 20 set(MSVC_SUFFIX 100)
Tank_Master@1628 21 endif (MSVC71)
zwagoth@0 22
zwagoth@0 23 set(vivox_src_dir "${CMAKE_SOURCE_DIR}/newview/vivox-runtime/i686-win32")
zwagoth@0 24 set(vivox_files
zwagoth@0 25 SLVoice.exe
liny@813 26 alut.dll
liny@813 27 vivoxsdk.dll
liny@813 28 ortp.dll
liny@813 29 wrap_oal.dll
zwagoth@0 30 )
zwagoth@0 31 copy_if_different(
zwagoth@0 32 ${vivox_src_dir}
zwagoth@0 33 "${CMAKE_CURRENT_BINARY_DIR}/Debug"
zwagoth@0 34 out_targets
zwagoth@0 35 ${vivox_files}
zwagoth@0 36 )
zwagoth@0 37 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 38
zwagoth@0 39
zwagoth@0 40
zwagoth@0 41 set(debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
zwagoth@0 42 set(debug_files
zwagoth@0 43 libapr-1.dll
zwagoth@0 44 libaprutil-1.dll
zwagoth@0 45 libapriconv-1.dll
zwagoth@0 46 libhunspell.dll
zwagoth@0 47 lgggrowl++.dll
zwagoth@0 48 lgggrowl.dll
zwagoth@0 49 )
zwagoth@0 50
zwagoth@0 51 copy_if_different(
zwagoth@0 52 ${debug_src_dir}
zwagoth@0 53 "${CMAKE_CURRENT_BINARY_DIR}/Debug"
zwagoth@0 54 out_targets
zwagoth@0 55 ${debug_files}
zwagoth@0 56 )
zwagoth@0 57 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 58
Tank_Master@1074 59 set(debug_src_dir "${CMAKE_SOURCE_DIR}/../fmodapi375win/api")
Tank_Master@1074 60 set(debug_files
Tank_Master@1074 61 fmod.dll
Tank_Master@1074 62 )
Tank_Master@1074 63
Tank_Master@1074 64 copy_if_different(
Tank_Master@1074 65 ${debug_src_dir}
Tank_Master@1074 66 "${CMAKE_CURRENT_BINARY_DIR}/Debug"
Tank_Master@1074 67 out_targets
Tank_Master@1074 68 ${debug_files}
Tank_Master@1074 69 )
Tank_Master@1074 70 set(all_targets ${all_targets} ${out_targets})
Tank_Master@1074 71
zwagoth@0 72 # Debug config runtime files required for the plugin test mule
zwagoth@0 73 set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
zwagoth@0 74 set(plugintest_debug_files
zwagoth@0 75 libeay32.dll
zwagoth@0 76 libglib-2.0-0.dll
zwagoth@0 77 libgmodule-2.0-0.dll
zwagoth@0 78 libgobject-2.0-0.dll
zwagoth@0 79 libgthread-2.0-0.dll
zwagoth@0 80 qtcored4.dll
zwagoth@0 81 qtguid4.dll
zwagoth@0 82 qtnetworkd4.dll
zwagoth@0 83 qtopengld4.dll
zwagoth@0 84 qtwebkitd4.dll
zwagoth@0 85 ssleay32.dll
zwagoth@0 86 )
zwagoth@0 87 copy_if_different(
zwagoth@0 88 ${plugintest_debug_src_dir}
zwagoth@0 89 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Debug"
zwagoth@0 90 out_targets
zwagoth@0 91 ${plugintest_debug_files}
zwagoth@0 92 )
zwagoth@0 93 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 94
zwagoth@0 95 # Debug config runtime files required for the plugin test mule (Qt image format plugins)
zwagoth@0 96 set(plugintest_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug/imageformats")
zwagoth@0 97 set(plugintest_debug_files
zwagoth@0 98 qgifd4.dll
zwagoth@0 99 qicod4.dll
zwagoth@0 100 qjpegd4.dll
zwagoth@0 101 qmngd4.dll
zwagoth@0 102 qsvgd4.dll
zwagoth@0 103 qtiffd4.dll
zwagoth@0 104 )
zwagoth@0 105 copy_if_different(
zwagoth@0 106 ${plugintest_debug_src_dir}
zwagoth@0 107 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Debug/imageformats"
zwagoth@0 108 out_targets
zwagoth@0 109 ${plugintest_debug_files}
zwagoth@0 110 )
zwagoth@0 111 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 112
zwagoth@0 113 copy_if_different(
zwagoth@0 114 ${plugintest_debug_src_dir}
zwagoth@0 115 "${CMAKE_CURRENT_BINARY_DIR}/llplugin/imageformats"
zwagoth@0 116 out_targets
zwagoth@0 117 ${plugintest_debug_files}
zwagoth@0 118 )
zwagoth@0 119 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 120
zwagoth@0 121 # Release & ReleaseDebInfo config runtime files required for the plugin test mule
zwagoth@0 122 set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
zwagoth@0 123 set(plugintest_release_files
zwagoth@0 124 libeay32.dll
zwagoth@0 125 libglib-2.0-0.dll
zwagoth@0 126 libgmodule-2.0-0.dll
zwagoth@0 127 libgobject-2.0-0.dll
zwagoth@0 128 libgthread-2.0-0.dll
zwagoth@0 129 # llkdu.dll (not required for plugin test)
zwagoth@0 130 qtcore4.dll
zwagoth@0 131 qtgui4.dll
zwagoth@0 132 qtnetwork4.dll
zwagoth@0 133 qtopengl4.dll
zwagoth@0 134 qtwebkit4.dll
zwagoth@0 135 ssleay32.dll
zwagoth@0 136 )
zwagoth@0 137 copy_if_different(
zwagoth@0 138 ${plugintest_release_src_dir}
zwagoth@0 139 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Release"
zwagoth@0 140 out_targets
zwagoth@0 141 ${plugintest_release_files}
zwagoth@0 142 )
zwagoth@0 143 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 144
zwagoth@0 145 copy_if_different(
zwagoth@0 146 ${plugintest_release_src_dir}
zwagoth@0 147 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/RelWithDebInfo"
zwagoth@0 148 out_targets
zwagoth@0 149 ${plugintest_release_files}
zwagoth@0 150 )
zwagoth@0 151 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 152
zwagoth@0 153 # Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
zwagoth@0 154 set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/imageformats")
zwagoth@0 155 set(plugintest_release_files
zwagoth@0 156 qgif4.dll
zwagoth@0 157 qico4.dll
zwagoth@0 158 qjpeg4.dll
zwagoth@0 159 qmng4.dll
zwagoth@0 160 qsvg4.dll
zwagoth@0 161 qtiff4.dll
zwagoth@0 162 )
zwagoth@0 163 copy_if_different(
zwagoth@0 164 ${plugintest_release_src_dir}
zwagoth@0 165 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/Release/imageformats"
zwagoth@0 166 out_targets
zwagoth@0 167 ${plugintest_release_files}
zwagoth@0 168 )
zwagoth@0 169 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 170
zwagoth@0 171 copy_if_different(
zwagoth@0 172 ${plugintest_release_src_dir}
zwagoth@0 173 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/RelWithDebInfo/imageformats"
zwagoth@0 174 out_targets
zwagoth@0 175 ${plugintest_release_files}
zwagoth@0 176 )
zwagoth@0 177 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 178
zwagoth@0 179 copy_if_different(
zwagoth@0 180 ${plugintest_release_src_dir}
zwagoth@0 181 "${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin/imageformats"
zwagoth@0 182 out_targets
zwagoth@0 183 ${plugintest_release_files}
zwagoth@0 184 )
zwagoth@0 185 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 186
zwagoth@0 187 copy_if_different(
zwagoth@0 188 ${plugintest_release_src_dir}
zwagoth@0 189 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin/imageformats"
zwagoth@0 190 out_targets
zwagoth@0 191 ${plugintest_release_files}
zwagoth@0 192 )
zwagoth@0 193 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 194
zwagoth@0 195 # Debug config runtime files required for the plugins
zwagoth@0 196 set(plugins_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
zwagoth@0 197 set(plugins_debug_files
zwagoth@0 198 libeay32.dll
zwagoth@0 199 qtcored4.dll
zwagoth@0 200 qtguid4.dll
zwagoth@0 201 qtnetworkd4.dll
zwagoth@0 202 qtopengld4.dll
zwagoth@0 203 qtwebkitd4.dll
zwagoth@0 204 ssleay32.dll
Wolfspirit@568 205 QtXmlPatternsd4.dll
zwagoth@0 206 )
zwagoth@0 207 copy_if_different(
zwagoth@0 208 ${plugins_debug_src_dir}
zwagoth@0 209 "${CMAKE_CURRENT_BINARY_DIR}/Debug/llplugin"
zwagoth@0 210 out_targets
zwagoth@0 211 ${plugins_debug_files}
zwagoth@0 212 )
zwagoth@0 213 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 214
zwagoth@0 215 # Release & ReleaseDebInfo config runtime files required for the plugins
zwagoth@0 216 set(plugins_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
zwagoth@0 217 set(plugins_release_files
zwagoth@0 218 libeay32.dll
zwagoth@0 219 qtcore4.dll
zwagoth@0 220 qtgui4.dll
zwagoth@0 221 qtnetwork4.dll
zwagoth@0 222 qtopengl4.dll
zwagoth@0 223 qtwebkit4.dll
zwagoth@0 224 ssleay32.dll
Wolfspirit@568 225 QtXmlPatterns4.dll
zwagoth@0 226 )
zwagoth@0 227 copy_if_different(
zwagoth@0 228 ${plugins_release_src_dir}
zwagoth@0 229 "${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin"
zwagoth@0 230 out_targets
zwagoth@0 231 ${plugins_release_files}
zwagoth@0 232 )
zwagoth@0 233 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 234
zwagoth@0 235 copy_if_different(
zwagoth@0 236 ${plugins_release_src_dir}
zwagoth@0 237 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llplugin"
zwagoth@0 238 out_targets
zwagoth@0 239 ${plugins_release_files}
zwagoth@0 240 )
zwagoth@0 241 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 242
zwagoth@0 243 set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
zwagoth@0 244 set(release_files
zwagoth@0 245 libapr-1.dll
zwagoth@0 246 libaprutil-1.dll
zwagoth@0 247 libapriconv-1.dll
zwagoth@0 248 libhunspell.dll
zwagoth@0 249 lgggrowl++.dll
zwagoth@0 250 lgggrowl.dll
zwagoth@0 251 )
zwagoth@0 252
zwagoth@0 253 copy_if_different(
zwagoth@0 254 ${release_src_dir}
zwagoth@0 255 "${CMAKE_CURRENT_BINARY_DIR}/Release"
zwagoth@0 256 out_targets
zwagoth@0 257 ${release_files}
zwagoth@0 258 )
zwagoth@0 259 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 260
Tank_Master@1074 261 set(release_src_dir "${CMAKE_SOURCE_DIR}/../fmodapi375win/api")
Tank_Master@1074 262 set(release_files
Tank_Master@1074 263 fmod.dll
Tank_Master@1074 264 )
Tank_Master@1074 265
Tank_Master@1074 266 copy_if_different(
Tank_Master@1074 267 ${release_src_dir}
Tank_Master@1074 268 "${CMAKE_CURRENT_BINARY_DIR}/Release"
Tank_Master@1074 269 out_targets
Tank_Master@1074 270 ${release_files}
Tank_Master@1074 271 )
Tank_Master@1074 272 set(all_targets ${all_targets} ${out_targets})
Tank_Master@1074 273
zwagoth@0 274 copy_if_different(
zwagoth@0 275 ${vivox_src_dir}
zwagoth@0 276 "${CMAKE_CURRENT_BINARY_DIR}/Release"
zwagoth@0 277 out_targets
zwagoth@0 278 ${vivox_files}
zwagoth@0 279 )
zwagoth@0 280 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 281
zwagoth@0 282
zwagoth@0 283 copy_if_different(
zwagoth@0 284 ${release_src_dir}
zwagoth@0 285 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
zwagoth@0 286 out_targets
zwagoth@0 287 ${release_files}
zwagoth@0 288 )
zwagoth@0 289 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 290
zwagoth@0 291 copy_if_different(
zwagoth@0 292 ${vivox_src_dir}
zwagoth@0 293 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
zwagoth@0 294 out_targets
zwagoth@0 295 ${vivox_files}
zwagoth@0 296 )
zwagoth@0 297 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 298
zwagoth@0 299 set(internal_llkdu_path "${CMAKE_SOURCE_DIR}/llkdu")
zwagoth@0 300 if(EXISTS ${internal_llkdu_path})
zwagoth@0 301 set(internal_llkdu_src "${CMAKE_BINARY_DIR}/llkdu/${CMAKE_CFG_INTDIR}/llkdu.dll")
zwagoth@0 302 set(llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/llkdu.dll")
zwagoth@0 303 ADD_CUSTOM_COMMAND(
zwagoth@0 304 OUTPUT ${llkdu_dst}
zwagoth@0 305 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${internal_llkdu_src} ${llkdu_dst}
zwagoth@0 306 DEPENDS ${internal_llkdu_src}
zwagoth@0 307 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
zwagoth@0 308 )
zwagoth@0 309 set(all_targets ${all_targets} ${llkdu_dst})
zwagoth@0 310 else(EXISTS ${internal_llkdu_path})
zwagoth@0 311 if (EXISTS "${debug_src_dir}/llkdu.dll")
zwagoth@0 312 set(debug_llkdu_src "${debug_src_dir}/llkdu.dll")
zwagoth@0 313 set(debug_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Debug/llkdu.dll")
zwagoth@0 314 ADD_CUSTOM_COMMAND(
zwagoth@0 315 OUTPUT ${debug_llkdu_dst}
zwagoth@0 316 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${debug_llkdu_src} ${debug_llkdu_dst}
zwagoth@0 317 DEPENDS ${debug_llkdu_src}
zwagoth@0 318 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Debug"
zwagoth@0 319 )
zwagoth@0 320 set(all_targets ${all_targets} ${debug_llkdu_dst})
zwagoth@0 321 endif (EXISTS "${debug_src_dir}/llkdu.dll")
zwagoth@0 322
zwagoth@0 323 if (EXISTS "${release_src_dir}/llkdu.dll")
zwagoth@0 324 set(release_llkdu_src "${release_src_dir}/llkdu.dll")
zwagoth@0 325 set(release_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/Release/llkdu.dll")
zwagoth@0 326 ADD_CUSTOM_COMMAND(
zwagoth@0 327 OUTPUT ${release_llkdu_dst}
zwagoth@0 328 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${release_llkdu_dst}
zwagoth@0 329 DEPENDS ${release_llkdu_src}
zwagoth@0 330 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/Release"
zwagoth@0 331 )
zwagoth@0 332 set(all_targets ${all_targets} ${release_llkdu_dst})
zwagoth@0 333
zwagoth@0 334 set(relwithdebinfo_llkdu_dst "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/llkdu.dll")
zwagoth@0 335 ADD_CUSTOM_COMMAND(
zwagoth@0 336 OUTPUT ${relwithdebinfo_llkdu_dst}
zwagoth@0 337 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${release_llkdu_src} ${relwithdebinfo_llkdu_dst}
zwagoth@0 338 DEPENDS ${release_llkdu_src}
zwagoth@0 339 COMMENT "Copying llkdu.dll ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
zwagoth@0 340 )
zwagoth@0 341 set(all_targets ${all_targets} ${relwithdebinfo_llkdu_dst})
zwagoth@0 342 endif (EXISTS "${release_src_dir}/llkdu.dll")
zwagoth@0 343
zwagoth@0 344 endif (EXISTS ${internal_llkdu_path})
zwagoth@0 345
zwagoth@0 346 # Copy MS C runtime dlls, required for packaging.
zwagoth@0 347 # *TODO - Adapt this to support VC9
Tank_Master@1628 348 FIND_PATH(debug_msvc_redist_path msvcr${MSVC_SUFFIX}d.dll
zwagoth@0 349 PATHS
Tank_Master@1628 350 ${MSVC_DEBUG_REDIST_PATH}
Tank_Master@1628 351 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSCV_DIR}\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT
zwagoth@0 352 NO_DEFAULT_PATH
zwagoth@0 353 NO_DEFAULT_PATH
zwagoth@0 354 )
zwagoth@0 355
Tank_Master@1628 356 if(EXISTS ${debug_msvc_redist_path})
Tank_Master@1628 357 set(debug_msvc${MSVC_SUFFIX}_files
Tank_Master@1628 358 msvcr${MSVC_SUFFIX}d.dll
Tank_Master@1628 359 msvcp${MSVC_SUFFIX}d.dll
Tank_Master@1628 360 Microsoft.VC${MSVC_SUFFIX}.DebugCRT.manifest
zwagoth@0 361 )
zwagoth@0 362
zwagoth@0 363 copy_if_different(
Tank_Master@1628 364 ${debug_msvc_redist_path}
zwagoth@0 365 "${CMAKE_CURRENT_BINARY_DIR}/Debug"
zwagoth@0 366 out_targets
Tank_Master@1628 367 ${debug_msvc_files}
zwagoth@0 368 )
zwagoth@0 369 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 370
Kadah@799 371 set(debug_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/Debug/secondlife-bin.exe.config)
zwagoth@0 372 add_custom_command(
zwagoth@0 373 OUTPUT ${debug_appconfig_file}
zwagoth@0 374 COMMAND ${PYTHON_EXECUTABLE}
zwagoth@0 375 ARGS
zwagoth@0 376 ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
Tank_Master@1628 377 ${CMAKE_CURRENT_BINARY_DIR}/Debug/Microsoft.VC${MSVC_SUFFIX}.DebugCRT.manifest
zwagoth@0 378 ${CMAKE_CURRENT_SOURCE_DIR}/SecondLifeDebug.exe.config
zwagoth@0 379 ${debug_appconfig_file}
Tank_Master@1628 380 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Debug/Microsoft.VC${MSVC_SUFFIX}.DebugCRT.manifest
zwagoth@0 381 COMMENT "Creating debug app config file"
zwagoth@0 382 )
zwagoth@0 383
Tank_Master@1628 384 endif (EXISTS ${debug_msvc_redist_path})
zwagoth@0 385
Tank_Master@1628 386 FIND_PATH(release_msvc_redist_path msvcr${MSVC_SUFFIX}.dll
zwagoth@0 387 PATHS
Tank_Master@1628 388 ${MSVC_REDIST_PATH}
Tank_Master@1628 389 [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_DIR}\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC${MSVC_SUFFIX}.CRT
zwagoth@0 390 NO_DEFAULT_PATH
zwagoth@0 391 NO_DEFAULT_PATH
zwagoth@0 392 )
zwagoth@0 393
Tank_Master@1628 394 if(EXISTS ${release_msvc_redist_path})
zwagoth@0 395 set(release_msvc8_files
Tank_Master@1628 396 msvcr${MSVC_SUFFIX}.dll
Tank_Master@1628 397 msvcp${MSVC_SUFFIX}.dll
Tank_Master@1628 398 Microsoft.VC${MSVC_SUFFIX}.CRT.manifest
zwagoth@0 399 )
zwagoth@0 400
zwagoth@0 401 copy_if_different(
Tank_Master@1628 402 ${release_msvc_redist_path}
zwagoth@0 403 "${CMAKE_CURRENT_BINARY_DIR}/Release"
zwagoth@0 404 out_targets
Tank_Master@1628 405 ${release_msvc_files}
zwagoth@0 406 )
zwagoth@0 407 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 408
zwagoth@0 409 copy_if_different(
Tank_Master@1628 410 ${release_msvc_redist_path}
zwagoth@0 411 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo"
zwagoth@0 412 out_targets
Tank_Master@1628 413 ${release_msvc_files}
zwagoth@0 414 )
zwagoth@0 415 set(all_targets ${all_targets} ${out_targets})
zwagoth@0 416
Kadah@799 417 set(release_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/Release/secondlife-bin.exe.config)
zwagoth@0 418 add_custom_command(
zwagoth@0 419 OUTPUT ${release_appconfig_file}
zwagoth@0 420 COMMAND ${PYTHON_EXECUTABLE}
zwagoth@0 421 ARGS
zwagoth@0 422 ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
Tank_Master@1628 423 ${CMAKE_CURRENT_BINARY_DIR}/Release/Microsoft.VC${MSVC_SUFFIX}.CRT.manifest
zwagoth@0 424 ${CMAKE_CURRENT_SOURCE_DIR}/SecondLife.exe.config
zwagoth@0 425 ${release_appconfig_file}
Tank_Master@1628 426 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Release/Microsoft.VC${MSVC_SUFFIX}.CRT.manifest
zwagoth@0 427 COMMENT "Creating release app config file"
zwagoth@0 428 )
zwagoth@0 429
Kadah@799 430 set(relwithdebinfo_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/secondlife-bin.exe.config)
zwagoth@0 431 add_custom_command(
zwagoth@0 432 OUTPUT ${relwithdebinfo_appconfig_file}
zwagoth@0 433 COMMAND ${PYTHON_EXECUTABLE}
zwagoth@0 434 ARGS
zwagoth@0 435 ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
Tank_Master@1628 436 ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/Microsoft.VC${MSVC_SUFFIX}.CRT.manifest
zwagoth@0 437 ${CMAKE_CURRENT_SOURCE_DIR}/SecondLife.exe.config
zwagoth@0 438 ${relwithdebinfo_appconfig_file}
Tank_Master@1628 439 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/Microsoft.VC${MSVC_SUFFIX}.CRT.manifest
zwagoth@0 440 COMMENT "Creating relwithdebinfo app config file"
zwagoth@0 441 )
zwagoth@0 442
Tank_Master@1628 443 endif (EXISTS ${release_msvc_redist_path})
zwagoth@0 444
zwagoth@0 445 add_custom_target(copy_win_libs ALL
zwagoth@0 446 DEPENDS
zwagoth@0 447 ${all_targets}
zwagoth@0 448 ${release_appconfig_file}
zwagoth@0 449 ${relwithdebinfo_appconfig_file}
zwagoth@0 450 ${debug_appconfig_file}
zwagoth@0 451 )
zwagoth@0 452 add_dependencies(copy_win_libs prepare)
zwagoth@0 453
zwagoth@0 454 if(EXISTS ${internal_llkdu_path})
zwagoth@0 455 add_dependencies(copy_win_libs llkdu)
zwagoth@0 456 endif(EXISTS ${internal_llkdu_path})

mercurial