Commit 846701f0 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: fix wxdialog to build with xcode

parent 21bac165
......@@ -83,8 +83,8 @@ IF(WXWIDGETS_FOUND)
ENDIF(LINUX)
# if the checkbox view functionality is not desired,
# exclude this part from the sample
# exclude this part from the smple
SET(WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES})
TARGET_LINK_LIBRARIES(WXDialog ${WXWIDGETS_LIBRARIES} cmsys CMakeLib)
# if UPX is found, make a target
......
......@@ -372,12 +372,34 @@ IF( WIN32 )
ELSE( WIN32 )
FIND_PROGRAM( CMAKE_WX_CONFIG wx-config ../wx/bin ../../wx/bin )
SET( CMAKE_WX_CXX_FLAGS "`${CMAKE_WX_CONFIG} --cxxflags`" )
SET( WXWINDOWS_LIBRARIES "`${CMAKE_WX_CONFIG} --libs`" )
IF(CMAKE_WX_CONFIG)
SET(WXWINDOWS_FOUND 1)
SET(WXWINDOWS_FOUND 1)
# run the config program to get cxxflags
EXEC_PROGRAM(${CMAKE_WX_CONFIG} ARGS --cxxflags OUTPUT_VARIABLE
CMAKE_WX_CXX_FLAGS RETURN_VALUE RET1)
# run the config program to get the libs
EXEC_PROGRAM(${CMAKE_WX_CONFIG} ARGS --libs OUTPUT_VARIABLE
WXWINDOWS_LIBRARIES_TMP RETURN_VALUE RET2)
# for libraries break things up into a ; separated variable
SEPARATE_ARGUMENTS(WXWINDOWS_LIBRARIES_TMP)
SET(LAST_FRAME 0)
# now put the stuff back into WXWINDOWS_LIBRARIES
# but combine all the -framework foo arguments back together
FOREACH(arg ${WXWINDOWS_LIBRARIES_TMP})
IF(${arg} MATCHES "-framework")
SET(LAST_FRAME 1)
ELSE(${arg} MATCHES "-framework")
# not a -framework argument
IF(${LAST_FRAME} EQUAL 1)
SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} "-framework ${arg}")
SET(LAST_FRAME 0)
ELSE(${LAST_FRAME} EQUAL 1)
SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} ${arg})
ENDIF(${LAST_FRAME} EQUAL 1)
ENDIF(${arg} MATCHES "-framework")
ENDFOREACH(arg)
ENDIF(CMAKE_WX_CONFIG)
## extract linkdirs (-L) for rpath
## use regular expression to match wildcard equivalent "-L*<endchar>"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment