comparison CMakeLists.txt @ 372:a032df77b6ab

Simple debug helper. Unittests. Meta-object for polymorphic non-QObjects
author Max Samukha <maxter@spambox.com>
date Thu, 08 Jul 2010 17:19:05 +0300
parents 7fd4b69378bf
children 681af90e1d53
comparison
equal deleted inserted replaced
370:7fd4b69378bf 372:a032df77b6ab
494 set(link_cpp ${link_cpp} cpp_${req_lower} ${QT_QT${req_upper}_LIBRARY}) 494 set(link_cpp ${link_cpp} cpp_${req_lower} ${QT_QT${req_upper}_LIBRARY})
495 endforeach() 495 endforeach()
496 target_link_libraries(cpp_${package} ${link_cpp} ) 496 target_link_libraries(cpp_${package} ${link_cpp} )
497 set(d_objs ${d_objs} ${objects}) 497 set(d_objs ${d_objs} ${objects})
498 498
499 if(CPP_SHARED AND CMAKE_HOST_WIN32) 499 if(CPP_SHARED)
500 ## Create an implib library which will be linked to the D part. 500 set(cpp_lib ${CMAKE_BINARY_DIR}/lib/libcpp_${package}.${CMAKE_SHARED_LIBRARY_SUFFIX})
501 set(cpp_lib ${CMAKE_BINARY_DIR}/lib/libcpp_${package}.dll)
502 set(cpp_lib_native ${cpp_lib})
503 make_native_path(cpp_lib_native)
504 set(d_implib ${CMAKE_BINARY_DIR}/CMakeFiles/${package}.dir/cpp_${package}.lib)
505 set(d_implib_native ${d_implib})
506 make_native_path(d_implib_native)
507 add_custom_command(
508 OUTPUT "${d_implib}"
509 COMMAND "${IMPLIB}"
510 ARGS /system /PAGESIZE:64 ${d_implib_native} ${cpp_lib_native}
511 DEPENDS "cpp_${package}"
512 COMMENT "Creating implib ${lib_name}"
513 )
514 install(FILES ${cpp_lib} COMPONENT qtd DESTINATION lib) 501 install(FILES ${cpp_lib} COMPONENT qtd DESTINATION lib)
502
503 if(CMAKE_HOST_WIN32)
504 ## Create an implib library which will be linked to the D part.
505 set(cpp_lib_native ${cpp_lib})
506 make_native_path(cpp_lib_native)
507 set(d_implib ${CMAKE_BINARY_DIR}/CMakeFiles/${package}.dir/cpp_${package}.lib)
508 set(d_implib_native ${d_implib})
509 make_native_path(d_implib_native)
510 add_custom_command(
511 OUTPUT "${d_implib}"
512 COMMAND "${IMPLIB}"
513 ARGS /system /PAGESIZE:64 ${d_implib_native} ${cpp_lib_native}
514 DEPENDS "cpp_${package}"
515 COMMENT "Creating implib ${lib_name}"
516 )
517 endif()
515 else() 518 else()
516 set(${package}_lib_param Qt${package_big}) 519 set(${package}_lib_param Qt${package_big})
517 endif() 520 endif()
518 #FIXME remove redundancy again. see above 521
519 if(CPP_SHARED AND CMAKE_HOST_UNIX)
520 set(cpp_lib ${CMAKE_BINARY_DIR}/lib/libcpp_${package}.so)
521 install(FILES ${cpp_lib} COMPONENT qtd DESTINATION lib)
522 endif()
523 ## Link the D part. 522 ## Link the D part.
524 add_d_target(${lib_name} NOT_DETECT_DEPENDS TYPE ${build_type} INCLUDES ${QTD_IMPORT_PATH} SOURCES ${d_sources} OBJECTS ${cpp_objs} ${d_implib} 523 add_d_target(${lib_name} NOT_DETECT_DEPENDS TYPE ${build_type} INCLUDES ${QTD_IMPORT_PATH} SOURCES ${d_sources} OBJECTS ${cpp_objs} ${d_implib}
525 OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib DEPENDS ${d_implib} ) 524 OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib DEPENDS ${d_implib} )
526 install(FILES ${CMAKE_BINARY_DIR}/${lib} COMPONENT qtd DESTINATION lib) 525 install(FILES ${CMAKE_BINARY_DIR}/${lib} COMPONENT qtd DESTINATION lib)
527 ## Paths for the QtD libs. It is necessary for examples. 526 ## Paths for the QtD libs. It is necessary for examples.