1# wxWidgets
2set(_foo_CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}")
3if (WIN32)
4    set(CMAKE_PREFIX_PATH ${WXWIDGETS_ROOT})
5else()
6    set(CMAKE_PREFIX_PATH "${NCBI_TOOLS_ROOT}/wxWidgets-3.1.3-ncbi1/${CMAKE_BUILD_TYPE}/bin")
7endif()
8
9set(wxWidgets_USE_UNICODE ON)
10set(wxWidgets_USE_SHAREED_LIBS ${BUILD_SHARED_LIBS})
11
12if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
13    set(wxWidgets_CONFIG_OPTIONS "--debug=yes")
14    set(wxWidgets_USE_DEBUG ON)
15elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
16    set(wxWidgets_USE_DEBUG OFF)
17endif()
18
19find_package(GTK2)
20if (GTK2_FOUND)
21  set(WXWIDGETS_INCLUDE
22    ${NCBI_TOOLS_ROOT}/wxWidgets-3.1.3-ncbi1/${CMAKE_BUILD_TYPE}MT64/lib/wx/include/gtk2-ansi-3.1
23    ${NCBI_TOOLS_ROOT}/wxWidgets-3.1.3-ncbi1/include/wx-3.1
24    ${GTK2_INCLUDE_DIRS}
25  )
26  set(_wxp ${NCBI_TOOLS_ROOT}/wxWidgets-3.1.3-ncbi1/${CMAKE_BUILD_TYPE}MT64/lib/lib)
27  set(_wxs -3.1.so)
28  set(WXWIDGETS_LIBS
29    ${_wxp}wx_gtk2_gl${_wxs}
30    ${_wxp}wx_gtk2_richtext${_wxs}
31    ${_wxp}wx_gtk2_aui${_wxs}
32    ${_wxp}wx_gtk2_propgrid${_wxs}
33    ${_wxp}wx_gtk2_xrc${_wxs}
34    ${_wxp}wx_gtk2_html${_wxs}
35    ${_wxp}wx_gtk2_qa${_wxs}
36    ${_wxp}wx_gtk2_adv${_wxs}
37    ${_wxp}wx_gtk2_core${_wxs}
38    ${_wxp}wx_base_xml${_wxs}
39    ${_wxp}wx_base_net${_wxs}
40    ${_wxp}wx_base${_wxs}
41    ${GTK2_LIBRARIES}
42  )
43  set(WXWIDGETS_FOUND YES)
44endif()
45
46set(CMAKE_PREFIX_PATH "${_foo_CMAKE_PREFIX_PATH}")
47
48
49#FIXME: this is broken
50#include( ${wxWidgets_USE_FILE} )
51
52## message(STATUS "wxWidgets: CONFIG_OPTIONS   = ${wxWidgets_CONFIG_OPTIONS}")
53## message(STATUS "wxWidgets: DEBUG            = ${wxWidgets_USE_DEBUG}")
54## message(STATUS "wxWidgets: SHARED_LIBS      = ${wxWidgets_USE_SHAREED_LIBS}")
55## message(STATUS "wxWidgets: CXX_FLAGS        = ${wxWidgets_CXX_FLAGS}")
56## message(STATUS "wxWidgets: DEFINITIONS      = ${wxWidgets_DEFINITIONS}")
57## message(STATUS "wxWidgets: LIBRARIES        = ${wxWidgets_LIBRARIES}")
58## message(STATUS "wxWidgets: USE_FILE         = ${wxWidgets_USE_FILE}")
59
60
61