# HG changeset patch # User Eldar Insafutdinov # Date 1278809982 -3600 # Node ID 347e4c7a9ba1c1d8edfabfa8a9f4b88928e61557 # Parent beb04f46ef4ad5127e48354d78a861c07ad93ffe make QwtD compile on Windows@ diff -r beb04f46ef4a -r 347e4c7a9ba1 CMakeLists.txt --- a/CMakeLists.txt Sat Jul 10 22:32:16 2010 +0100 +++ b/CMakeLists.txt Sun Jul 11 01:59:42 2010 +0100 @@ -104,17 +104,19 @@ endforeach() set(QWT_INCLUDE_PATH "/usr/include/qwt-qt4" CACHE STRING "Qwt include path") - +if(CMAKE_HOST_WIN32) + set(QWT_LIB_PATH "" CACHE STRING "Qwt lib path") +endif() set(inc_paths "") if(CMAKE_HOST_WIN32) - set(sep ";") + set(sep "*") else() set(sep ":") endif() if(BUILD_QT_QWT) - set(inc_paths ${inc_paths}${sep}${QWT_INCLUDE_PATH}) + set(inc_paths ${inc_paths}${sep}${QWT_INCLUDE_PATH}${sep}) endif() add_subdirectory(generator) @@ -169,7 +171,7 @@ math(EXPR QTD_VERSION "(${QT_VERSION_MAJOR} << 16) + (${QT_VERSION_MINOR} << 8) + ${QT_VERSION_PATCH}") include_directories(${QT_INCLUDES} ${CMAKE_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include) -if(${BUILD_QT_QWT}) +if(BUILD_QT_QWT) include_directories(${QWT_INCLUDE_PATH}) endif() @@ -494,6 +496,18 @@ string(TOLOWER ${req} req_lower) set(link_cpp ${link_cpp} cpp_${req_lower} ${QT_QT${req_upper}_LIBRARY}) endforeach() + + if(${package_big} STREQUAL "Qwt" AND CMAKE_HOST_WIN32) + set(qwt_release_lib ${QWT_LIB_PATH}/libqwt5.a) + set(qwt_debug_lib ${QWT_LIB_PATH}/libqwtd5.a) + if(EXISTS ${qwt_release_lib}) + set(qwt_lib ${qwt_release_lib}) + elseif(EXISTS ${qwt_debug_lib}) + set(qwt_lib ${qwt_debug_lib}) + endif() + set(link_cpp ${link_cpp} ${qwt_lib}) + endif() + target_link_libraries(cpp_${package} ${link_cpp} ) set(d_objs ${d_objs} ${objects}) diff -r beb04f46ef4a -r 347e4c7a9ba1 build/core.txt --- a/build/core.txt Sat Jul 10 22:32:16 2010 +0100 +++ b/build/core.txt Sun Jul 11 01:59:42 2010 +0100 @@ -39,7 +39,6 @@ Array ArrayOpsPrimitive Atomic - Attribute Core Debug Marshal diff -r beb04f46ef4a -r 347e4c7a9ba1 build/qwt.txt --- a/build/qwt.txt Sat Jul 10 22:32:16 2010 +0100 +++ b/build/qwt.txt Sun Jul 11 01:59:42 2010 +0100 @@ -1,9 +1,9 @@ set(required Core Gui) set(classes + QwtPlotItem QwtPlot QwtPlotDict - QwtPlotItem QwtLegendItemManager QwtText QwtLegend diff -r beb04f46ef4a -r 347e4c7a9ba1 examples/qwt/simpleplot/build.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/qwt/simpleplot/build.bat Sun Jul 11 01:59:42 2010 +0100 @@ -0,0 +1,1 @@ +dmd simple.d qtdcore.lib qtdgui.lib qtdqwt.lib -ofsimple \ No newline at end of file diff -r beb04f46ef4a -r 347e4c7a9ba1 examples/qwt/simpleplot/simple.d --- a/examples/qwt/simpleplot/simple.d Sat Jul 10 22:32:16 2010 +0100 +++ b/examples/qwt/simpleplot/simple.d Sun Jul 11 01:59:42 2010 +0100 @@ -16,6 +16,7 @@ // A simple example which shows how to use QwtPlot and QwtData //----------------------------------------------------------------- +// hack to avoid linker error (undefined symbols), possibly a compiler bug real mysin(real arg) { return sin(arg); diff -r beb04f46ef4a -r 347e4c7a9ba1 generator/main.h --- a/generator/main.h Sat Jul 10 22:32:16 2010 +0100 +++ b/generator/main.h Sun Jul 11 01:59:42 2010 +0100 @@ -73,7 +73,7 @@ includes << QString("."); #if defined(Q_OS_WIN32) - const char *path_splitter = ";"; + const char *path_splitter = "*"; #else const char *path_splitter = ":"; #endif