diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-19 09:42:58 -0400 |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-09-19 09:42:58 -0400 |
commit | 0dafd886fc719b5fbb0d56f30262ba09c76a160b (patch) | |
tree | b2c65789c3b9dbf505154750e20bc86027250441 /Modules/FindwxWindows.cmake | |
parent | b13e120d92516f1371daafd564d192502befe348 (diff) | |
download | cmake-0dafd886fc719b5fbb0d56f30262ba09c76a160b.tar.gz |
Improve searching for wxWindows
Diffstat (limited to 'Modules/FindwxWindows.cmake')
-rw-r--r-- | Modules/FindwxWindows.cmake | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake index 591a8a3dab..a02ea019c5 100644 --- a/Modules/FindwxWindows.cmake +++ b/Modules/FindwxWindows.cmake @@ -40,29 +40,36 @@ IF(WIN32) MARK_AS_ADVANCED(WXWINDOWS_USE_SHARED_LIBS) ENDIF(WXWINDOWS_SHARED_LIBRARY) + SET(CMAKE_WX_LIBRARIES ${CMAKE_WX_LIBRARIES} comctl32 ctl3d32 wsock32 rpcrt4) + IF(WXWINDOWS_USE_SHARED_LIBS) - SET(WXWINDOWS_LIBRARY ${WXWINDOWS_SHARED_LIBRARY}) + SET(WXWINDOWS_LIBRARY ${WXWINDOWS_SHARED_LIBRARY} ${CMAKE_WX_LIBRARIES}) ELSE(WXWINDOWS_USE_SHARED_LIBS) - SET(WXWINDOWS_LIBRARY ${WXWINDOWS_STATIC_LIBRARY}) + SET(WXWINDOWS_LIBRARY ${WXWINDOWS_STATIC_LIBRARY} ${CMAKE_WX_LIBRARIES}) ENDIF(WXWINDOWS_USE_SHARED_LIBS) + MARK_AS_ADVANCED( + WXWINDOWS_STATIC_LIBRARY + WXWINDOWS_SHARED_LIBRARY + WXWINDOWS_INCLUDE_PATH + ) + ELSE(WIN32) FIND_PROGRAM(CMAKE_WX_CONFIG wx-config) - # This has to be done at some point - #EXEC_PROGRAM(wx-config ARGS --cflags OUTPUT_VARIABLE WXWINDOWS_COMPILE_FLAGS RETURN_VALUE WX_CFLAGS_) - #EXEC_PROGRAM(wx-config ARGS --libs OUTPUT_VARIABLE WXWINDOWS_LINK_FLAGS RETURN_VALUE WX_LIBS_RVAL) - #IF(WX_CFLAGS_RVAL) - SET(CMAKE_WX_CXX_FLAGS "`${CMAKE_WX_CONFIG} --cflags`") - #ELSE(WX_CFLAGS_RVAL) - # MESSAGE("Cannot find \"wx-config\" or wxWindows is not configured properly") - #ENDIF(WX_CFLAGS_RVAL) - SET(CMAKE_WX_LIBRARIES "`${CMAKE_WX_CONFIG} --libs`") + SET(CMAKE_WX_CXX_FLAGS "`${CMAKE_WX_CONFIG} --cflags`") + SET(WXWINDOWS_LIBRARY "`${CMAKE_WX_CONFIG} --libs`") ENDIF(WIN32) MARK_AS_ADVANCED( - WXWINDOWS_STATIC_LIBRARY - WXWINDOWS_SHARED_LIBRARY + CMAKE_WX_CXX_FLAGS WXWINDOWS_INCLUDE_PATH ) + +IF(WXWINDOWS_LIBRARY) + IF(WXWINDOWS_INCLUDE_PATH OR CMAKE_WX_CXX_FLAGS) + SET(CMAKE_WX_CAN_COMPILE 1) + ENDIF(WXWINDOWS_INCLUDE_PATH OR CMAKE_WX_CXX_FLAGS) +ENDIF(WXWINDOWS_LIBRARY) + |