Mercurial > projects > qtd
comparison CMakeLists.txt @ 280:bcc498ccf334
Fix for windows build
author | SokoL_SD |
---|---|
date | Fri, 09 Oct 2009 08:43:15 +0000 |
parents | 750ea0c5fe83 |
children | 256ab6cb8e85 |
comparison
equal
deleted
inserted
replaced
279:519befd5a5d1 | 280:bcc498ccf334 |
---|---|
442 endif(CPP_SHARED) | 442 endif(CPP_SHARED) |
443 add_library(cpp_${package} ${cpp_method} ${cpp_sources}) | 443 add_library(cpp_${package} ${cpp_method} ${cpp_sources}) |
444 set_property(TARGET cpp_${package} PROPERTY RUNTIME_OUTPUT_DIRECTORY lib) | 444 set_property(TARGET cpp_${package} PROPERTY RUNTIME_OUTPUT_DIRECTORY lib) |
445 set_property(TARGET cpp_${package} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles) | 445 set_property(TARGET cpp_${package} PROPERTY ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles) |
446 set(link_cpp ${link_cpp} ${QT_QT${package_upper}_LIBRARY}) | 446 set(link_cpp ${link_cpp} ${QT_QT${package_upper}_LIBRARY}) |
447 target_link_libraries(cpp_${package} ${link_cpp} ) | |
448 if(CPP_SHARED) | 447 if(CPP_SHARED) |
449 else(CPP_SHARED) | 448 else(CPP_SHARED) |
450 ## Get an objects list. It will be used in building the D part. | 449 ## Get an objects list. It will be used in building the D part. |
451 foreach(cpp_source ${cpp_sources}) | 450 foreach(cpp_source ${cpp_sources}) |
452 set(cpp_source ${cpp_source}) | 451 set(cpp_source ${cpp_source}) |
463 else(BUILD_SHARED_LIBRARIES) | 462 else(BUILD_SHARED_LIBRARIES) |
464 set(lib lib/${D_LIB_PREFIX}${lib_name}${D_LIB_SUFFIX}) | 463 set(lib lib/${D_LIB_PREFIX}${lib_name}${D_LIB_SUFFIX}) |
465 set(build_type STATIC) | 464 set(build_type STATIC) |
466 endif(BUILD_SHARED_LIBRARIES) | 465 endif(BUILD_SHARED_LIBRARIES) |
467 | 466 |
468 ## A test of packages dependencies. | 467 ## Package dependencies. |
469 foreach(req ${required}) | 468 foreach(req ${required}) |
470 set(is_found) | 469 set(is_found) |
471 foreach(pack ${packages_big}) | 470 foreach(pack ${packages_big}) |
472 if("${pack}" STREQUAL "${req}") | 471 if("${pack}" STREQUAL "${req}") |
473 set(is_found 1) | 472 set(is_found 1) |
474 break(pack ${packages_big}) | 473 break(pack ${packages_big}) |
475 endif("${pack}" STREQUAL "${req}") | 474 endif("${pack}" STREQUAL "${req}") |
476 endforeach(pack ${packages_big}) | 475 endforeach(pack ${packages_big}) |
477 if(NOT is_found) | 476 if(NOT is_found) |
478 message(FATAL_ERROR "Package ${package_big} requires ${req}, but it is not found") | 477 message(FATAL_ERROR "Package ${package_big} requires ${req}, but it is not found") |
479 endif(NOT is_found) | 478 endif(NOT is_found) |
480 string(TOUPPER ${req} req_upper) | 479 string(TOUPPER ${req} req_upper) |
481 string(TOLOWER ${req} req_lower) | 480 string(TOLOWER ${req} req_lower) |
482 set(link_cpp ${link_cpp} cpp_${req_lower} ${QT_QT${req_upper}_LIBRARY}) | 481 set(link_cpp ${link_cpp} cpp_${req_lower} ${QT_QT${req_upper}_LIBRARY}) |
483 endforeach(req ${require}) | 482 endforeach(req ${require}) |
483 target_link_libraries(cpp_${package} ${link_cpp} ) | |
484 set(d_objs ${d_objs} ${objects}) | 484 set(d_objs ${d_objs} ${objects}) |
485 | 485 |
486 if(CPP_SHARED) | 486 if(CPP_SHARED) |
487 ## Create an implib library which will be linked to the D part. | 487 ## Create an implib library which will be linked to the D part. |
488 set(cpp_lib ${CMAKE_BINARY_DIR}/lib/libcpp_${package}.dll) | 488 set(cpp_lib ${CMAKE_BINARY_DIR}/lib/libcpp_${package}.dll) |