comparison CMakeLists.txt @ 244:405f49532492

CMake: windows fix
author SokoL_SD
date Tue, 21 Jul 2009 13:50:09 +0000
parents e4cbe1e9ded6
children 7664de4a55e5
comparison
equal deleted inserted replaced
243:e4cbe1e9ded6 244:405f49532492
76 # System specific settings. 76 # System specific settings.
77 if(CMAKE_HOST_WIN32) 77 if(CMAKE_HOST_WIN32)
78 set(implib implib) 78 set(implib implib)
79 find_program(IMPLIB ${implib}) 79 find_program(IMPLIB ${implib})
80 if (NOT IMPLIB) 80 if (NOT IMPLIB)
81 message(FATAL_ERROR "implib not found. You can donwload it from http://ftp.digitalmars.com/bup.zip") 81 message(FATAL_ERROR "implib is not found. You can donwload it from http://ftp.digitalmars.com/bup.zip")
82 endif (NOT IMPLIB) 82 endif (NOT IMPLIB)
83 if(D_IS_MARS) 83 if(D_IS_MARS)
84 set(GEN_OPT ${GEN_OPT} --cpp_shared) 84 set(GEN_OPT ${GEN_OPT} --cpp_shared)
85 add_definitions(-DCPP_SHARED) 85 add_definitions(-DCPP_SHARED)
86 endif(D_IS_MARS) 86 endif(D_IS_MARS)
137 ##-------------------------------------------- 137 ##--------------------------------------------
138 ## CPack. 138 ## CPack.
139 ##-------------------------------------------- 139 ##--------------------------------------------
140 set(CPACK_PACKAGE_VERSION_PATCH 1) 140 set(CPACK_PACKAGE_VERSION_PATCH 1)
141 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "QtD is a D binding to the Qt application and UI framework. 141 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "QtD is a D binding to the Qt application and UI framework.
142 QtD is a D binding to the Qt application and UI framework.
143 This package installs binding and static library for qt port on D programming language. 142 This package installs binding and static library for qt port on D programming language.
144 ") 143 ")
145 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/changelog.txt") 144 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/changelog.txt")
146 SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/license.txt") 145 SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/license.txt")
147 set(CPACK_PACKAGE_VENDOR "QtD team") 146 set(CPACK_PACKAGE_VENDOR "QtD team")
279 set(PACKAGES_tmp QtCore QtGui) 278 set(PACKAGES_tmp QtCore QtGui)
280 endif(NOT PACKAGES_tmp) 279 endif(NOT PACKAGES_tmp)
281 280
282 if(RESOURCES_tmp) 281 if(RESOURCES_tmp)
283 if(NOT BUILD_TOOLS) 282 if(NOT BUILD_TOOLS)
284 message(STATUS "Example '${name}' required drcc. Example will not build") 283 message(STATUS "Example '${name}' requires drcc. Example will not build")
285 return(build_example name) 284 return(build_example name)
286 endif(NOT BUILD_TOOLS) 285 endif(NOT BUILD_TOOLS)
287 qtd_add_resource(res_sources ${RESOURCES_tmp} NAME ${name} ) 286 qtd_add_resource(res_sources ${RESOURCES_tmp} NAME ${name} )
288 endif(RESOURCES_tmp) 287 endif(RESOURCES_tmp)
289 288
290 if(UIC_tmp) 289 if(UIC_tmp)
291 if(NOT BUILD_TOOLS) 290 if(NOT BUILD_TOOLS)
292 message(STATUS "Example '${name}' require drcc. Example will not build") 291 message(STATUS "Example '${name}' requires drcc. Example will not build")
293 return(build_example name) 292 return(build_example name)
294 endif(NOT BUILD_TOOLS) 293 endif(NOT BUILD_TOOLS)
295 qtd_wrap_ui(uic_sources ${UIC_tmp}) 294 qtd_wrap_ui(uic_sources ${UIC_tmp})
296 endif(UIC_tmp) 295 endif(UIC_tmp)
297 296
304 set(is_founded 1) 303 set(is_founded 1)
305 break(package_big ${packages_big}) 304 break(package_big ${packages_big})
306 endif(${req} STREQUAL ${package_big}) 305 endif(${req} STREQUAL ${package_big})
307 endforeach(package_big ${packages_big}) 306 endforeach(package_big ${packages_big})
308 if(NOT is_founded) 307 if(NOT is_founded)
309 message(STATUS "Example '${name}' require the package '${req}', but it is not active. Example will not build") 308 message(STATUS "Example '${name}' requires the package '${req}', but it is not active. Example will not build")
310 return(build_example name) 309 return(build_example name)
311 else(NOT is_founded) 310 else(NOT is_founded)
312 set(qtd_libs ${${package}_lib_param} ${qtd_libs}) 311 set(qtd_libs ${${package}_lib_param} ${qtd_libs})
313 endif(NOT is_founded) 312 endif(NOT is_founded)
314 endforeach(package ${PACKAGES_tmp}) 313 endforeach(package ${PACKAGES_tmp})
367 if(${pack} STREQUAL ${req}) 366 if(${pack} STREQUAL ${req})
368 set(req_found 1) 367 set(req_found 1)
369 endif(${pack} STREQUAL ${req}) 368 endif(${pack} STREQUAL ${req})
370 endforeach(pack ${all_packages}) 369 endforeach(pack ${all_packages})
371 if(req_found) 370 if(req_found)
372 message(STATUS "Package '${package_big}' require '${req}', but it is not active") 371 message(STATUS "Package '${package_big}' requires '${req}', but it is not active")
373 else(req_found) 372 else(req_found)
374 message(STATUS "Package '${package_big}' require '${req}', but it is not found") 373 message(STATUS "Package '${package_big}' requires '${req}', but it is not found")
375 endif(req_found) 374 endif(req_found)
376 set(all_req_found) 375 set(all_req_found)
377 endif(NOT req_found) 376 endif(NOT req_found)
378 endforeach(req ${required}) 377 endforeach(req ${required})
379 else(BUILD_QT_${package_upper}) 378 else(BUILD_QT_${package_upper})
456 set(is_found 1) 455 set(is_found 1)
457 break(pack ${packages_big}) 456 break(pack ${packages_big})
458 endif("${pack}" STREQUAL "${req}") 457 endif("${pack}" STREQUAL "${req}")
459 endforeach(pack ${packages_big}) 458 endforeach(pack ${packages_big})
460 if(NOT is_found) 459 if(NOT is_found)
461 message(FATAL_ERROR "Package ${package_big} require ${req}, but it is not found") 460 message(FATAL_ERROR "Package ${package_big} requires ${req}, but it is not found")
462 endif(NOT is_found) 461 endif(NOT is_found)
463 string(TOUPPER ${req} req_upper) 462 string(TOUPPER ${req} req_upper)
464 string(TOLOWER ${req} req_lower) 463 string(TOLOWER ${req} req_lower)
465 set(link_cpp ${link_cpp} cpp_${req_lower} ${QT_QT${req_upper}_LIBRARY}) 464 set(link_cpp ${link_cpp} cpp_${req_lower} ${QT_QT${req_upper}_LIBRARY})
466 endforeach(req ${require}) 465 endforeach(req ${require})