Improve searching for wxWindows

This commit is contained in:
Andy Cedilnik 2002-09-19 09:42:58 -04:00
parent b13e120d92
commit 0dafd886fc
1 changed files with 20 additions and 13 deletions

View File

@ -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(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)