diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-07-14 21:21:24 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-07-14 21:21:24 (GMT) |
commit | 846701f0a73b15d07df2f78a21f2f1aa0d3a082a (patch) | |
tree | 88dafbdacca0a598cc6d38f7075d892968885b25 /Source/WXDialog | |
parent | 21bac1658490e1ef458a7a65345b89908fe234cd (diff) | |
download | CMake-846701f0a73b15d07df2f78a21f2f1aa0d3a082a.zip CMake-846701f0a73b15d07df2f78a21f2f1aa0d3a082a.tar.gz CMake-846701f0a73b15d07df2f78a21f2f1aa0d3a082a.tar.bz2 |
ENH: fix wxdialog to build with xcode
Diffstat (limited to 'Source/WXDialog')
-rw-r--r-- | Source/WXDialog/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Source/WXDialog/bin/FindwxWin.cmake | 30 |
2 files changed, 28 insertions, 6 deletions
diff --git a/Source/WXDialog/CMakeLists.txt b/Source/WXDialog/CMakeLists.txt index a721df4..29b4fae 100644 --- a/Source/WXDialog/CMakeLists.txt +++ b/Source/WXDialog/CMakeLists.txt @@ -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 diff --git a/Source/WXDialog/bin/FindwxWin.cmake b/Source/WXDialog/bin/FindwxWin.cmake index 9dd9008..fe1a27f 100644 --- a/Source/WXDialog/bin/FindwxWin.cmake +++ b/Source/WXDialog/bin/FindwxWin.cmake @@ -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>" |