From 7c92b94bc1e4c30e441ff3fd35169931cd11cfa6 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 4 Dec 2011 02:48:01 +0100 Subject: [PATCH 01/30] Use Cg from Externals if it is not found systemwide. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e870304dc4..e28cc901d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -371,6 +371,10 @@ else() endif(NOT GLEW_FOUND) check_lib(CG Cg Cg/cg.h) + if(NOT CG_FOUND) + message("Shared Cg not found, falling back to the static library") + include_directories(Externals) + endif(NOT CG_FOUND) check_lib(CGGL CgGL Cg/cgGL.h) endif() From ffb06c23acb78a905b39c0808316e9398def821d Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 4 Dec 2011 03:37:02 +0100 Subject: [PATCH 02/30] Added version check for wxWidgets. If the systemwide wxWidgets is too old, we can fall back to the version from Externals instead of letting the build fail. Note that while the version in Externals appears to be wxWidgets 2.8, it has post-2.8 features manually added to it (wxAuiToolBar), so the version check only accepts 2.9 or higher. --- CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e28cc901d4..3648c82e52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -388,6 +388,21 @@ if(NOT DISABLE_WX) include(FindwxWidgets OPTIONAL) FIND_PACKAGE(wxWidgets COMPONENTS core aui adv) + if(wxWidgets_FOUND) + EXECUTE_PROCESS( + COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" + ${wxWidgets_CONFIG_OPTIONS} --version + OUTPUT_VARIABLE wxWidgets_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + message("Found wxWidgets version ${wxWidgets_VERSION}") + if(${wxWidgets_VERSION} VERSION_LESS "2.9.0") + message("At least 2.9.0 is required; ignoring found version") + unset(wxWidgets_FOUND) + endif() + endif(wxWidgets_FOUND) + if(wxWidgets_FOUND) include(${wxWidgets_USE_FILE}) From 7f578ce1aecd936f56053bebf901ade35e33b2d3 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 4 Dec 2011 03:59:42 +0100 Subject: [PATCH 03/30] Use Externals/wxWidgets3 instead of Externals/wxWidgets under OS X. The "3" variant has some extra stuff merged that helps under OS X. This split should not last longer than until the wxWidgets 3.0 release. --- CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3648c82e52..1e13aef68b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -433,8 +433,15 @@ if(NOT DISABLE_WX) message(FATAL_ERROR "wxWidgets not found. It is required to build the GUI") endif() message("Shared wxWidgets not found, falling back to the static library") - include_directories(Externals/wxWidgets/include) - add_subdirectory(Externals/wxWidgets) + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + add_definitions(-D__WXOSX_COCOA__) + include_directories(Externals/wxWidgets3) + include_directories(Externals/wxWidgets3/include) + add_subdirectory(Externals/wxWidgets3) + else() + include_directories(Externals/wxWidgets/include) + add_subdirectory(Externals/wxWidgets) + endif() endif(wxWidgets_FOUND) add_definitions(-DHAVE_WX=1) endif(NOT DISABLE_WX) From d249ee599a8d0fc78013b8432c33a5eb1ed27e0c Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 4 Dec 2011 15:43:52 +0100 Subject: [PATCH 04/30] Added CMakeLists.txt for wxWidgets under OS X. The vast majority of the changes in this commit were originally done by Shawn Hoffman in commit c86846cf9c995d8e0463419bd9477b0dae884929. --- Externals/wxWidgets3/CMakeLists.txt | 1244 +++++++++++++++++++++++++++ 1 file changed, 1244 insertions(+) create mode 100644 Externals/wxWidgets3/CMakeLists.txt diff --git a/Externals/wxWidgets3/CMakeLists.txt b/Externals/wxWidgets3/CMakeLists.txt new file mode 100644 index 0000000000..09437f5b68 --- /dev/null +++ b/Externals/wxWidgets3/CMakeLists.txt @@ -0,0 +1,1244 @@ +# gtk, msw, osx and shared files as of r67291 + +set(SRCS_AUI + "src/aui/auibar.cpp" + "src/aui/auibook.cpp" + "src/aui/dockart.cpp" + "src/aui/floatpane.cpp" + "src/aui/framemanager.cpp" + "src/aui/tabmdi.cpp") + +set(SRCS_COMMON + "src/common/accelcmn.cpp" + #"src/common/accesscmn.cpp" + "src/common/anidecod.cpp" + "src/common/animatecmn.cpp" + "src/common/any.cpp" + "src/common/appbase.cpp" + "src/common/appcmn.cpp" + "src/common/arcall.cpp" + "src/common/arcfind.cpp" + "src/common/archive.cpp" + "src/common/arrstr.cpp" + "src/common/artprov.cpp" + "src/common/artstd.cpp" + "src/common/arttango.cpp" + "src/common/base64.cpp" + "src/common/bmpbase.cpp" + "src/common/bmpbtncmn.cpp" + "src/common/bmpcboxcmn.cpp" + "src/common/bookctrl.cpp" + "src/common/btncmn.cpp" + "src/common/cairo.cpp" + "src/common/calctrlcmn.cpp" + "src/common/checkboxcmn.cpp" + "src/common/checklstcmn.cpp" + "src/common/choiccmn.cpp" + "src/common/clipcmn.cpp" + "src/common/clntdata.cpp" + "src/common/clrpickercmn.cpp" + "src/common/cmdline.cpp" + "src/common/cmdproc.cpp" + "src/common/cmndata.cpp" + "src/common/colourcmn.cpp" + "src/common/colourdata.cpp" + "src/common/combocmn.cpp" + "src/common/config.cpp" + "src/common/containr.cpp" + "src/common/convauto.cpp" + "src/common/cshelp.cpp" + "src/common/ctrlcmn.cpp" + "src/common/ctrlsub.cpp" + "src/common/datavcmn.cpp" + "src/common/datetime.cpp" + "src/common/datetimefmt.cpp" + "src/common/datstrm.cpp" + "src/common/dcbase.cpp" + "src/common/dcbufcmn.cpp" + "src/common/dcgraph.cpp" + "src/common/dcsvg.cpp" + "src/common/debugrpt.cpp" + "src/common/dircmn.cpp" + "src/common/dirctrlcmn.cpp" + "src/common/dlgcmn.cpp" + "src/common/dndcmn.cpp" + "src/common/dobjcmn.cpp" + "src/common/docmdi.cpp" + "src/common/docview.cpp" + "src/common/dpycmn.cpp" + "src/common/dseldlg.cpp" + "src/common/dynarray.cpp" + "src/common/dynlib.cpp" + "src/common/dynload.cpp" + #"src/common/effects.cpp" + "src/common/encconv.cpp" + "src/common/event.cpp" + "src/common/evtloopcmn.cpp" + "src/common/extended.c" + "src/common/fddlgcmn.cpp" + "src/common/fdiodispatcher.cpp" + "src/common/ffile.cpp" + "src/common/file.cpp" + "src/common/fileback.cpp" + "src/common/fileconf.cpp" + "src/common/filectrlcmn.cpp" + "src/common/filefn.cpp" + "src/common/filehistorycmn.cpp" + "src/common/filename.cpp" + "src/common/filepickercmn.cpp" + "src/common/filesys.cpp" + "src/common/filtall.cpp" + "src/common/filtfind.cpp" + "src/common/fldlgcmn.cpp" + "src/common/fmapbase.cpp" + "src/common/fontcmn.cpp" + "src/common/fontdata.cpp" + "src/common/fontenumcmn.cpp" + "src/common/fontmap.cpp" + #"src/common/fontmgrcmn.cpp" + "src/common/fontpickercmn.cpp" + "src/common/fontutilcmn.cpp" + "src/common/framecmn.cpp" + "src/common/fs_arc.cpp" + "src/common/fs_filter.cpp" + "src/common/fs_inet.cpp" + "src/common/fs_mem.cpp" + #"src/common/fswatchercmn.cpp" + "src/common/ftp.cpp" + "src/common/gaugecmn.cpp" + "src/common/gbsizer.cpp" + "src/common/gdicmn.cpp" + "src/common/geometry.cpp" + "src/common/gifdecod.cpp" + "src/common/glcmn.cpp" + "src/common/graphcmn.cpp" + "src/common/gridcmn.cpp" + "src/common/hash.cpp" + "src/common/hashmap.cpp" + "src/common/headercolcmn.cpp" + "src/common/headerctrlcmn.cpp" + "src/common/helpbase.cpp" + "src/common/http.cpp" + "src/common/hyperlnkcmn.cpp" + "src/common/iconbndl.cpp" + "src/common/imagall.cpp" + "src/common/imagbmp.cpp" + "src/common/image.cpp" + "src/common/imagfill.cpp" + #"src/common/imaggif.cpp" + #"src/common/imagiff.cpp" + #"src/common/imagjpeg.cpp" + #"src/common/imagpcx.cpp" + "src/common/imagpng.cpp" + #"src/common/imagpnm.cpp" + #"src/common/imagtga.cpp" + #"src/common/imagtiff.cpp" + #"src/common/imagxpm.cpp" + "src/common/init.cpp" + "src/common/intl.cpp" + "src/common/ipcbase.cpp" + "src/common/languageinfo.cpp" + "src/common/layout.cpp" + "src/common/lboxcmn.cpp" + "src/common/list.cpp" + "src/common/listctrlcmn.cpp" + "src/common/log.cpp" + "src/common/longlong.cpp" + #"src/common/markupparser.cpp" + "src/common/matrix.cpp" + #"src/common/mediactrlcmn.cpp" + #"src/common/memory.cpp" + "src/common/menucmn.cpp" + "src/common/mimecmn.cpp" + "src/common/module.cpp" + "src/common/mousemanager.cpp" + "src/common/msgout.cpp" + "src/common/mstream.cpp" + "src/common/nbkbase.cpp" + "src/common/numformatter.cpp" + "src/common/object.cpp" + "src/common/odcombocmn.cpp" + "src/common/overlaycmn.cpp" + #"src/common/ownerdrwcmn.cpp" + "src/common/panelcmn.cpp" + "src/common/paper.cpp" + "src/common/persist.cpp" + "src/common/pickerbase.cpp" + "src/common/platinfo.cpp" + "src/common/popupcmn.cpp" + "src/common/powercmn.cpp" + "src/common/prntbase.cpp" + "src/common/process.cpp" + "src/common/protocol.cpp" + "src/common/quantize.cpp" + "src/common/radiobtncmn.cpp" + "src/common/radiocmn.cpp" + "src/common/rearrangectrl.cpp" + #"src/common/regex.cpp" + "src/common/rendcmn.cpp" + "src/common/rgncmn.cpp" + "src/common/sckaddr.cpp" + "src/common/sckfile.cpp" + "src/common/sckipc.cpp" + "src/common/sckstrm.cpp" + "src/common/scrolbarcmn.cpp" + "src/common/selectdispatcher.cpp" + "src/common/settcmn.cpp" + "src/common/sizer.cpp" + "src/common/slidercmn.cpp" + "src/common/socket.cpp" + "src/common/socketiohandler.cpp" + "src/common/spinbtncmn.cpp" + "src/common/spinctrlcmn.cpp" + "src/common/srchcmn.cpp" + "src/common/sstream.cpp" + "src/common/statbar.cpp" + "src/common/statbmpcmn.cpp" + "src/common/statboxcmn.cpp" + "src/common/statlinecmn.cpp" + "src/common/stattextcmn.cpp" + "src/common/stdpbase.cpp" + "src/common/stdstream.cpp" + "src/common/stockitem.cpp" + "src/common/stopwatch.cpp" + "src/common/strconv.cpp" + "src/common/stream.cpp" + "src/common/string.cpp" + "src/common/stringimpl.cpp" + "src/common/stringops.cpp" + "src/common/strvararg.cpp" + "src/common/sysopt.cpp" + "src/common/tarstrm.cpp" + "src/common/taskbarcmn.cpp" + "src/common/tbarbase.cpp" + "src/common/textbuf.cpp" + "src/common/textcmn.cpp" + "src/common/textentrycmn.cpp" + "src/common/textfile.cpp" + "src/common/timercmn.cpp" + "src/common/timerimpl.cpp" + "src/common/tokenzr.cpp" + "src/common/toplvcmn.cpp" + "src/common/translation.cpp" + "src/common/treebase.cpp" + "src/common/txtstrm.cpp" + "src/common/uiactioncmn.cpp" + "src/common/unichar.cpp" + "src/common/uri.cpp" + "src/common/url.cpp" + "src/common/ustring.cpp" + "src/common/utilscmn.cpp" + "src/common/valgen.cpp" + "src/common/validate.cpp" + "src/common/valnum.cpp" + "src/common/valtext.cpp" + "src/common/variant.cpp" + "src/common/wfstream.cpp" + "src/common/wincmn.cpp" + "src/common/windowid.cpp" + "src/common/wrapsizer.cpp" + "src/common/wxcrt.cpp" + "src/common/wxprintf.cpp" + "src/common/xlocale.cpp" + "src/common/xpmdecod.cpp" + #"src/common/xti.cpp" + #"src/common/xtistrm.cpp" + #"src/common/xtixml.cpp" + "src/common/zipstrm.cpp" + "src/common/zstream.cpp") + +set(SRCS_EXPAT + #"src/expat/lib/xmlparse.c" + #"src/expat/lib/xmlrole.c" + #"src/expat/lib/xmltok.c" + #"src/expat/lib/xmltok_impl.c" + #"src/expat/lib/xmltok_ns.c" + #"src/expat/xmlwf/codepage.c" + #"src/expat/xmlwf/ct.c" + #"src/expat/xmlwf/readfilemap.c" + #"src/expat/xmlwf/unixfilemap.c" + #"src/expat/xmlwf/win32filemap.c" + #"src/expat/xmlwf/xmlfile.c" + #"src/expat/xmlwf/xmlmime.c" + #"src/expat/xmlwf/xmlwf.c" + #"src/expat/xmlwf/xmlwin32url.cxx" +) + +set(SRCS_GENERIC + "src/generic/aboutdlgg.cpp" + "src/generic/bmpcboxg.cpp" + "src/generic/busyinfo.cpp" + "src/generic/buttonbar.cpp" + "src/generic/calctrlg.cpp" + "src/generic/caret.cpp" + "src/generic/choicbkg.cpp" + "src/generic/choicdgg.cpp" + #"src/generic/colour.cpp" + "src/generic/combog.cpp" + "src/generic/commandlinkbuttong.cpp" + "src/generic/datavgen.cpp" + "src/generic/datectlg.cpp" + #"src/generic/dbgrptg.cpp" + "src/generic/dcpsg.cpp" + "src/generic/dirctrlg.cpp" + "src/generic/dragimgg.cpp" + "src/generic/editlbox.cpp" + "src/generic/fdrepdlg.cpp" + "src/generic/filectrlg.cpp" + "src/generic/filepickerg.cpp" + "src/generic/fontdlgg.cpp" + #"src/generic/fswatcherg.cpp" + "src/generic/graphicc.cpp" + "src/generic/grid.cpp" + "src/generic/gridctrl.cpp" + "src/generic/grideditors.cpp" + "src/generic/gridsel.cpp" + "src/generic/headerctrlg.cpp" + "src/generic/helpext.cpp" + #"src/generic/htmllbox.cpp" + "src/generic/hyperlinkg.cpp" + "src/generic/infobar.cpp" + "src/generic/laywin.cpp" + "src/generic/listbkg.cpp" + "src/generic/listctrl.cpp" + "src/generic/logg.cpp" + #"src/generic/markuptext.cpp" + #"src/generic/mask.cpp" + "src/generic/mdig.cpp" + "src/generic/msgdlgg.cpp" + #"src/generic/notebook.cpp" + "src/generic/notifmsgg.cpp" + "src/generic/numdlgg.cpp" + "src/generic/odcombo.cpp" + "src/generic/panelg.cpp" + "src/generic/printps.cpp" + "src/generic/prntdlgg.cpp" + "src/generic/progdlgg.cpp" + "src/generic/propdlg.cpp" + #"src/generic/regiong.cpp" + "src/generic/renderg.cpp" + "src/generic/richmsgdlgg.cpp" + "src/generic/sashwin.cpp" + "src/generic/scrlwing.cpp" + "src/generic/selstore.cpp" + "src/generic/spinctlg.cpp" + "src/generic/splash.cpp" + "src/generic/splitter.cpp" + "src/generic/srchctlg.cpp" + "src/generic/statbmpg.cpp" + #"src/generic/statline.cpp" + "src/generic/stattextg.cpp" + "src/generic/statusbr.cpp" + "src/generic/tabg.cpp" + "src/generic/textdlgg.cpp" + #"src/generic/timer.cpp" + "src/generic/tipdlg.cpp" + "src/generic/tipwin.cpp" + "src/generic/toolbkg.cpp" + "src/generic/treebkg.cpp" + "src/generic/treectlg.cpp" + "src/generic/vlbox.cpp" + "src/generic/vscroll.cpp" + "src/generic/wizard.cpp") + +set(SRCS_GENERICGTK + "src/generic/accel.cpp" + "src/generic/icon.cpp" + "src/generic/imaglist.cpp" + "src/generic/paletteg.cpp") + +set(SRCS_GENERICOSX + "src/generic/animateg.cpp" + "src/generic/clrpickerg.cpp" + "src/generic/collpaneg.cpp" + "src/generic/colrdlgg.cpp" + "src/generic/dirdlgg.cpp" + "src/generic/filedlgg.cpp" + "src/generic/fontpickerg.cpp") + +set(SRCS_GTK + "src/gtk/aboutdlg.cpp" + "src/gtk/animate.cpp" + "src/gtk/app.cpp" + "src/gtk/artgtk.cpp" + "src/gtk/assertdlg_gtk.c" + "src/gtk/bitmap.cpp" + "src/gtk/bmpbuttn.cpp" + "src/gtk/bmpcbox.cpp" + "src/gtk/brush.cpp" + "src/gtk/button.cpp" + "src/gtk/calctrl.cpp" + "src/gtk/checkbox.cpp" + "src/gtk/checklst.cpp" + "src/gtk/choice.cpp" + "src/gtk/clipbrd.cpp" + "src/gtk/clrpicker.cpp" + "src/gtk/collpane.cpp" + "src/gtk/colordlg.cpp" + "src/gtk/colour.cpp" + "src/gtk/combobox.cpp" + "src/gtk/control.cpp" + "src/gtk/cursor.cpp" + "src/gtk/dataobj.cpp" + "src/gtk/dataview.cpp" + "src/gtk/dc.cpp" + "src/gtk/dcclient.cpp" + "src/gtk/dcmemory.cpp" + "src/gtk/dcscreen.cpp" + "src/gtk/dialog.cpp" + "src/gtk/dirdlg.cpp" + "src/gtk/dnd.cpp" + "src/gtk/eggtrayicon.c" + "src/gtk/evtloop.cpp" + "src/gtk/filectrl.cpp" + "src/gtk/filedlg.cpp" + "src/gtk/filehistory.cpp" + "src/gtk/filepicker.cpp" + "src/gtk/font.cpp" + "src/gtk/fontdlg.cpp" + "src/gtk/fontpicker.cpp" + "src/gtk/frame.cpp" + "src/gtk/gauge.cpp" + "src/gtk/glcanvas.cpp" + #"src/gtk/gnome/gprint.cpp" + #"src/gtk/gnome/gvfs.cpp" + #"src/gtk/hildon/notifmsg.cpp" + "src/gtk/hyperlink.cpp" + "src/gtk/infobar.cpp" + "src/gtk/listbox.cpp" + "src/gtk/mdi.cpp" + "src/gtk/menu.cpp" + "src/gtk/minifram.cpp" + "src/gtk/mnemonics.cpp" + "src/gtk/msgdlg.cpp" + "src/gtk/nativewin.cpp" + "src/gtk/notebook.cpp" + "src/gtk/pen.cpp" + "src/gtk/popupwin.cpp" + #"src/gtk/print.cpp" + "src/gtk/private.cpp" + "src/gtk/radiobox.cpp" + "src/gtk/radiobut.cpp" + "src/gtk/region.cpp" + "src/gtk/renderer.cpp" + "src/gtk/scrolbar.cpp" + "src/gtk/scrolwin.cpp" + "src/gtk/settings.cpp" + "src/gtk/slider.cpp" + "src/gtk/sockgtk.cpp" + "src/gtk/spinbutt.cpp" + "src/gtk/spinctrl.cpp" + "src/gtk/statbmp.cpp" + "src/gtk/statbox.cpp" + "src/gtk/statline.cpp" + "src/gtk/stattext.cpp" + "src/gtk/taskbar.cpp" + "src/gtk/textctrl.cpp" + "src/gtk/textentry.cpp" + "src/gtk/tglbtn.cpp" + "src/gtk/timer.cpp" + "src/gtk/toolbar.cpp" + "src/gtk/tooltip.cpp" + "src/gtk/toplevel.cpp" + "src/gtk/treeentry_gtk.c" + "src/gtk/utilsgtk.cpp" + "src/gtk/win_gtk.cpp" + "src/gtk/window.cpp") + +set(SRCS_HTML + "src/html/chm.cpp" + "src/html/helpctrl.cpp" + "src/html/helpdata.cpp" + "src/html/helpdlg.cpp" + "src/html/helpfrm.cpp" + "src/html/helpwnd.cpp" + "src/html/htmlcell.cpp" + #"src/html/htmlctrl/webkit/webkit.mm" + "src/html/htmlfilt.cpp" + "src/html/htmlpars.cpp" + "src/html/htmltag.cpp" + "src/html/htmlwin.cpp" + "src/html/htmprint.cpp" + "src/html/m_dflist.cpp" + "src/html/m_fonts.cpp" + "src/html/m_hline.cpp" + "src/html/m_image.cpp" + "src/html/m_layout.cpp" + "src/html/m_links.cpp" + "src/html/m_list.cpp" + "src/html/m_pre.cpp" + "src/html/m_span.cpp" + "src/html/m_style.cpp" + "src/html/m_tables.cpp" + "src/html/styleparams.cpp" + "src/html/winpars.cpp") + +set(SRCS_JPEG + "src/jpeg/jcapimin.c" + "src/jpeg/jcapistd.c" + "src/jpeg/jccoefct.c" + "src/jpeg/jccolor.c" + "src/jpeg/jcdctmgr.c" + "src/jpeg/jchuff.c" + "src/jpeg/jcinit.c" + "src/jpeg/jcmainct.c" + "src/jpeg/jcmarker.c" + "src/jpeg/jcmaster.c" + "src/jpeg/jcomapi.c" + "src/jpeg/jcparam.c" + "src/jpeg/jcphuff.c" + "src/jpeg/jcprepct.c" + "src/jpeg/jcsample.c" + "src/jpeg/jctrans.c" + "src/jpeg/jdapimin.c" + "src/jpeg/jdapistd.c" + "src/jpeg/jdatadst.c" + "src/jpeg/jdatasrc.c" + "src/jpeg/jdcoefct.c" + "src/jpeg/jdcolor.c" + "src/jpeg/jddctmgr.c" + "src/jpeg/jdhuff.c" + "src/jpeg/jdinput.c" + "src/jpeg/jdmainct.c" + "src/jpeg/jdmarker.c" + "src/jpeg/jdmaster.c" + "src/jpeg/jdmerge.c" + "src/jpeg/jdphuff.c" + "src/jpeg/jdpostct.c" + "src/jpeg/jdsample.c" + "src/jpeg/jdtrans.c" + "src/jpeg/jerror.c" + "src/jpeg/jfdctflt.c" + "src/jpeg/jfdctfst.c" + "src/jpeg/jfdctint.c" + "src/jpeg/jidctflt.c" + "src/jpeg/jidctfst.c" + "src/jpeg/jidctint.c" + "src/jpeg/jidctred.c" + "src/jpeg/jmemansi.c" + "src/jpeg/jmemmgr.c" + "src/jpeg/jmemname.c" + "src/jpeg/jmemnobs.c" + "src/jpeg/jquant1.c" + "src/jpeg/jquant2.c" + "src/jpeg/jutils.c") + +set(SRCS_MSW + "src/msw/aboutdlg.cpp" + "src/msw/accel.cpp" + "src/msw/app.cpp" + "src/msw/artmsw.cpp" + "src/msw/basemsw.cpp" + "src/msw/bitmap.cpp" + "src/msw/bmpbuttn.cpp" + "src/msw/bmpcbox.cpp" + "src/msw/brush.cpp" + "src/msw/button.cpp" + "src/msw/calctrl.cpp" + "src/msw/caret.cpp" + "src/msw/checkbox.cpp" + "src/msw/checklst.cpp" + "src/msw/choice.cpp" + "src/msw/clipbrd.cpp" + "src/msw/colordlg.cpp" + "src/msw/colour.cpp" + "src/msw/combo.cpp" + "src/msw/combobox.cpp" + "src/msw/commandlinkbutton.cpp" + "src/msw/control.cpp" + "src/msw/crashrpt.cpp" + "src/msw/cursor.cpp" + "src/msw/data.cpp" + "src/msw/datecontrols.cpp" + "src/msw/datectrl.cpp" + "src/msw/dc.cpp" + "src/msw/dcclient.cpp" + "src/msw/dcmemory.cpp" + "src/msw/dcprint.cpp" + "src/msw/dcscreen.cpp" + "src/msw/dde.cpp" + "src/msw/debughlp.cpp" + "src/msw/dialog.cpp" + "src/msw/dialup.cpp" + "src/msw/dib.cpp" + "src/msw/dir.cpp" + "src/msw/dirdlg.cpp" + "src/msw/display.cpp" + "src/msw/dlmsw.cpp" + "src/msw/dragimag.cpp" + "src/msw/enhmeta.cpp" + "src/msw/evtloop.cpp" + "src/msw/fdrepdlg.cpp" + "src/msw/filedlg.cpp" + "src/msw/font.cpp" + "src/msw/fontdlg.cpp" + "src/msw/fontenum.cpp" + "src/msw/fontutil.cpp" + "src/msw/frame.cpp" + #"src/msw/fswatcher.cpp" + "src/msw/gauge.cpp" + "src/msw/gdiimage.cpp" + "src/msw/gdiobj.cpp" + "src/msw/gdiplus.cpp" + "src/msw/glcanvas.cpp" + "src/msw/graphics.cpp" + "src/msw/headerctrl.cpp" + "src/msw/helpbest.cpp" + "src/msw/helpchm.cpp" + "src/msw/helpwin.cpp" + "src/msw/hyperlink.cpp" + "src/msw/icon.cpp" + "src/msw/imaglist.cpp" + "src/msw/iniconf.cpp" + #"src/msw/joystick.cpp" + "src/msw/listbox.cpp" + "src/msw/listctrl.cpp" + "src/msw/main.cpp" + "src/msw/mdi.cpp" + #"src/msw/mediactrl_am.cpp" + #"src/msw/mediactrl_qt.cpp" + #"src/msw/mediactrl_wmp10.cpp" + "src/msw/menu.cpp" + "src/msw/menuitem.cpp" + "src/msw/metafile.cpp" + "src/msw/microwin.c" + "src/msw/mimetype.cpp" + "src/msw/minifram.cpp" + "src/msw/msgdlg.cpp" + "src/msw/mslu.cpp" + "src/msw/nativdlg.cpp" + "src/msw/nativewin.cpp" + "src/msw/notebook.cpp" + "src/msw/notifmsg.cpp" + "src/msw/ole/access.cpp" + "src/msw/ole/activex.cpp" + "src/msw/ole/automtn.cpp" + "src/msw/ole/dataobj.cpp" + "src/msw/ole/dropsrc.cpp" + "src/msw/ole/droptgt.cpp" + "src/msw/ole/oleutils.cpp" + "src/msw/ole/uuid.cpp" + "src/msw/ownerdrw.cpp" + "src/msw/palette.cpp" + "src/msw/panel.cpp" + "src/msw/pen.cpp" + "src/msw/penwin.cpp" + "src/msw/popupwin.cpp" + "src/msw/power.cpp" + "src/msw/printdlg.cpp" + "src/msw/printwin.cpp" + "src/msw/progdlg.cpp" + "src/msw/radiobox.cpp" + "src/msw/radiobut.cpp" + "src/msw/regconf.cpp" + "src/msw/region.cpp" + "src/msw/registry.cpp" + "src/msw/renderer.cpp" + "src/msw/richmsgdlg.cpp" + "src/msw/scrolbar.cpp" + "src/msw/settings.cpp" + "src/msw/slider.cpp" + "src/msw/snglinst.cpp" + "src/msw/sockmsw.cpp" + "src/msw/sound.cpp" + "src/msw/spinbutt.cpp" + "src/msw/spinctrl.cpp" + #"src/msw/stackwalk.cpp" + "src/msw/statbmp.cpp" + "src/msw/statbox.cpp" + "src/msw/statline.cpp" + "src/msw/stattext.cpp" + "src/msw/statusbar.cpp" + "src/msw/stdpaths.cpp" + "src/msw/taskbar.cpp" + "src/msw/textctrl.cpp" + "src/msw/textentry.cpp" + "src/msw/tglbtn.cpp" + "src/msw/thread.cpp" + "src/msw/timer.cpp" + "src/msw/toolbar.cpp" + "src/msw/tooltip.cpp" + "src/msw/toplevel.cpp" + "src/msw/treectrl.cpp" + "src/msw/uiaction.cpp" + "src/msw/urlmsw.cpp" + "src/msw/utils.cpp" + "src/msw/utilsexc.cpp" + "src/msw/utilsgui.cpp" + "src/msw/uxtheme.cpp" + "src/msw/version.rc" + "src/msw/volume.cpp" + "src/msw/wince/checklst.cpp" + "src/msw/wince/choicece.cpp" + "src/msw/wince/crt.cpp" + "src/msw/wince/filedlgwce.cpp" + "src/msw/wince/filefnwce.cpp" + "src/msw/wince/helpwce.cpp" + "src/msw/wince/menuce.cpp" + "src/msw/wince/net.cpp" + "src/msw/wince/tbarwce.cpp" + "src/msw/wince/textctrlce.cpp" + "src/msw/wince/time.cpp" + "src/msw/window.cpp" + "src/msw/winestub.c") + +set(SRCS_OSX + "src/osx/accel.cpp" + "src/osx/artmac.cpp" + "src/osx/bmpbuttn_osx.cpp" + "src/osx/brush.cpp" + "src/osx/button_osx.cpp" + "src/osx/checkbox_osx.cpp" + "src/osx/checklst_osx.cpp" + "src/osx/choice_osx.cpp" + "src/osx/combobox_osx.cpp" + "src/osx/dataview_osx.cpp" + "src/osx/dialog_osx.cpp" + "src/osx/dnd_osx.cpp" + "src/osx/fontutil.cpp" + "src/osx/gauge_osx.cpp" + "src/osx/glcanvas_osx.cpp" + "src/osx/imaglist.cpp" + "src/osx/listbox_osx.cpp" + "src/osx/menu_osx.cpp" + "src/osx/menuitem_osx.cpp" + "src/osx/minifram.cpp" + "src/osx/nonownedwnd_osx.cpp" + "src/osx/notebook_osx.cpp" + "src/osx/palette.cpp" + "src/osx/pen.cpp" + "src/osx/printdlg_osx.cpp" + "src/osx/radiobox_osx.cpp" + "src/osx/radiobut_osx.cpp" + "src/osx/scrolbar_osx.cpp" + "src/osx/slider_osx.cpp" + "src/osx/sound_osx.cpp" + "src/osx/spinbutt_osx.cpp" + "src/osx/spinctrl_osx.cpp" + "src/osx/srchctrl_osx.cpp" + "src/osx/statbox_osx.cpp" + "src/osx/statline_osx.cpp" + "src/osx/stattext_osx.cpp" + "src/osx/textctrl_osx.cpp" + "src/osx/textentry_osx.cpp" + "src/osx/tglbtn_osx.cpp" + "src/osx/toolbar_osx.cpp" + "src/osx/toplevel_osx.cpp" + "src/osx/uiaction_osx.cpp" + "src/osx/utils_osx.cpp" + "src/osx/window_osx.cpp" + #"src/osx/carbon/aboutdlg.cpp" + "src/osx/carbon/app.cpp" + #"src/osx/carbon/bmpbuttn.cpp" + #"src/osx/carbon/button.cpp" + #"src/osx/carbon/checkbox.cpp" + #"src/osx/carbon/choice.cpp" + "src/osx/carbon/clipbrd.cpp" + #"src/osx/carbon/colordlg.cpp" + "src/osx/carbon/colordlgosx.mm" + #"src/osx/carbon/combobox.cpp" + #"src/osx/carbon/combobxc.cpp" + "src/osx/carbon/control.cpp" + "src/osx/carbon/cursor.cpp" + "src/osx/carbon/dataobj.cpp" + #"src/osx/carbon/dataview.cpp" + "src/osx/carbon/dcclient.cpp" + "src/osx/carbon/dcprint.cpp" + "src/osx/carbon/dcscreen.cpp" + #"src/osx/carbon/dialog.cpp" + #"src/osx/carbon/dirdlg.cpp" + #"src/osx/carbon/dirmac.cpp" + #"src/osx/carbon/dnd.cpp" + #"src/osx/carbon/drawer.cpp" + #"src/osx/carbon/evtloop.cpp" + #"src/osx/carbon/filedlg.cpp" + "src/osx/carbon/font.cpp" + "src/osx/carbon/fontdlg.cpp" + "src/osx/carbon/fontdlgosx.mm" + "src/osx/carbon/frame.cpp" + #"src/osx/carbon/gauge.cpp" + "src/osx/carbon/gdiobj.cpp" + #"src/osx/carbon/glcanvas.cpp" + "src/osx/carbon/graphics.cpp" + #"src/osx/carbon/helpxxxx.cpp" + "src/osx/carbon/icon.cpp" + #"src/osx/carbon/joystick.cpp" + #"src/osx/carbon/listbox.cpp" + #"src/osx/carbon/listctrl_mac.cpp" + #"src/osx/carbon/main.cpp" + "src/osx/carbon/mdi.cpp" + #"src/osx/carbon/mediactrl.cpp" + #"src/osx/carbon/menu.cpp" + #"src/osx/carbon/menuitem.cpp" + "src/osx/carbon/metafile.cpp" + #"src/osx/carbon/mimetmac.cpp" + #"src/osx/carbon/msgdlg.cpp" + #"src/osx/carbon/nonownedwnd.cpp" + #"src/osx/carbon/notebmac.cpp" + #"src/osx/carbon/overlay.cpp" + "src/osx/carbon/popupwin.cpp" + #"src/osx/carbon/printdlg.cpp" + #"src/osx/carbon/radiobut.cpp" + "src/osx/carbon/region.cpp" + "src/osx/carbon/renderer.cpp" + #"src/osx/carbon/scrolbar.cpp" + "src/osx/carbon/settings.cpp" + #"src/osx/carbon/slider.cpp" + #"src/osx/carbon/sound.cpp" + #"src/osx/carbon/spinbutt.cpp" + #"src/osx/carbon/srchctrl.cpp" + #"src/osx/carbon/statbmp.cpp" + #"src/osx/carbon/statbox.cpp" + "src/osx/carbon/statbrma.cpp" + #"src/osx/carbon/statline.cpp" + #"src/osx/carbon/statlmac.cpp" + #"src/osx/carbon/stattext.cpp" + #"src/osx/carbon/taskbar.cpp" + #"src/osx/carbon/textctrl.cpp" + #"src/osx/carbon/tglbtn.cpp" + #"src/osx/carbon/thread.cpp" + #"src/osx/carbon/timer.cpp" + #"src/osx/carbon/toolbar.cpp" + #"src/osx/carbon/tooltip.cpp" + #"src/osx/carbon/uma.cpp" + #"src/osx/carbon/utils.cpp" + "src/osx/carbon/utilscocoa.mm" + #"src/osx/carbon/window.cpp" + "src/osx/cocoa/aboutdlg.mm" + "src/osx/cocoa/button.mm" + "src/osx/cocoa/checkbox.mm" + "src/osx/cocoa/choice.mm" + "src/osx/cocoa/colour.mm" + "src/osx/cocoa/combobox.mm" + "src/osx/cocoa/dataview.mm" + "src/osx/cocoa/dialog.mm" + "src/osx/cocoa/dirdlg.mm" + "src/osx/cocoa/dnd.mm" + "src/osx/cocoa/evtloop.mm" + "src/osx/cocoa/filedlg.mm" + "src/osx/cocoa/gauge.mm" + "src/osx/cocoa/glcanvas.mm" + "src/osx/cocoa/listbox.mm" + #"src/osx/cocoa/mediactrl.mm" + "src/osx/cocoa/menu.mm" + "src/osx/cocoa/menuitem.mm" + "src/osx/cocoa/msgdlg.mm" + "src/osx/cocoa/nonownedwnd.mm" + "src/osx/cocoa/notebook.mm" + "src/osx/cocoa/overlay.mm" + "src/osx/cocoa/printdlg.mm" + "src/osx/cocoa/radiobut.mm" + "src/osx/cocoa/scrolbar.mm" + "src/osx/cocoa/slider.mm" + "src/osx/cocoa/spinbutt.mm" + "src/osx/cocoa/srchctrl.mm" + "src/osx/cocoa/statbox.mm" + "src/osx/cocoa/statline.mm" + "src/osx/cocoa/stattext.mm" + "src/osx/cocoa/taskbar.mm" + "src/osx/cocoa/textctrl.mm" + "src/osx/cocoa/tglbtn.mm" + "src/osx/cocoa/toolbar.mm" + "src/osx/cocoa/tooltip.mm" + "src/osx/cocoa/utils.mm" + "src/osx/cocoa/window.mm" + "src/osx/core/bitmap.cpp" + "src/osx/core/cfstring.cpp" + "src/osx/core/colour.cpp" + "src/osx/core/dcmemory.cpp" + "src/osx/core/display.cpp" + "src/osx/core/evtloop_cf.cpp" + "src/osx/core/fontenum.cpp" + "src/osx/core/glgrab.cpp" + "src/osx/core/hid.cpp" + #"src/osx/core/hidjoystick.cpp" + "src/osx/core/mimetype.cpp" + "src/osx/core/printmac.cpp" + "src/osx/core/sockosx.cpp" + "src/osx/core/sound.cpp" + "src/osx/core/stdpaths_cf.cpp" + "src/osx/core/strconv_cf.cpp" + "src/osx/core/timer.cpp" + "src/osx/core/utilsexc_base.cpp" + "src/osx/core/utilsexc_cf.cpp" + #"src/osx/iphone/button.mm" + #"src/osx/iphone/checkbox.mm" + #"src/osx/iphone/dialog.mm" + #"src/osx/iphone/evtloop.mm" + #"src/osx/iphone/gauge.mm" + #"src/osx/iphone/glcanvas.mm" + #"src/osx/iphone/msgdlg.mm" + #"src/osx/iphone/nonownedwnd.mm" + #"src/osx/iphone/scrolbar.mm" + #"src/osx/iphone/slider.mm" + #"src/osx/iphone/stattext.mm" + #"src/osx/iphone/textctrl.mm" + #"src/osx/iphone/toolbar.mm" + #"src/osx/iphone/utils.mm" + #"src/osx/iphone/window.mm" +) + +set(SRCS_PNG + "src/png/png.c" + "src/png/pngerror.c" + "src/png/pngget.c" + "src/png/pngmem.c" + "src/png/pngpread.c" + "src/png/pngread.c" + "src/png/pngrio.c" + "src/png/pngrtran.c" + "src/png/pngrutil.c" + "src/png/pngset.c" + "src/png/pngtrans.c" + "src/png/pngwio.c" + "src/png/pngwrite.c" + "src/png/pngwtran.c" + "src/png/pngwutil.c") + +set(SRCS_PROPGRID + "src/propgrid/advprops.cpp" + "src/propgrid/editors.cpp" + "src/propgrid/manager.cpp" + "src/propgrid/property.cpp" + "src/propgrid/propgrid.cpp" + "src/propgrid/propgridiface.cpp" + "src/propgrid/propgridpagestate.cpp" + "src/propgrid/props.cpp") + +set(SRCS_REGEX + "src/regex/regcomp.c" + "src/regex/regerror.c" + "src/regex/regexec.c" + "src/regex/regfree.c") + +set(SRCS_RIBBON + "src/ribbon/art_aui.cpp" + "src/ribbon/art_internal.cpp" + "src/ribbon/art_msw.cpp" + "src/ribbon/bar.cpp" + "src/ribbon/buttonbar.cpp" + "src/ribbon/control.cpp" + "src/ribbon/gallery.cpp" + "src/ribbon/page.cpp" + "src/ribbon/panel.cpp" + "src/ribbon/toolbar.cpp") + +set(SRCS_RICHTEXT + #"src/richtext/richtextbackgroundpage.cpp" + #"src/richtext/richtextborderspage.cpp" + "src/richtext/richtextbuffer.cpp" + #"src/richtext/richtextbulletspage.cpp" + "src/richtext/richtextctrl.cpp" + #"src/richtext/richtextfontpage.cpp" + "src/richtext/richtextformatdlg.cpp" + "src/richtext/richtexthtml.cpp" + "src/richtext/richtextimagedlg.cpp" + #"src/richtext/richtextindentspage.cpp" + #"src/richtext/richtextliststylepage.cpp" + #"src/richtext/richtextmarginspage.cpp" + "src/richtext/richtextprint.cpp" + #"src/richtext/richtextsizepage.cpp" + "src/richtext/richtextstyledlg.cpp" + #"src/richtext/richtextstylepage.cpp" + "src/richtext/richtextstyles.cpp" + "src/richtext/richtextsymboldlg.cpp" + #"src/richtext/richtexttabspage.cpp" + "src/richtext/richtextxml.cpp") + +set(SRCS_STC + "src/stc/PlatWX.cpp" + "src/stc/ScintillaWX.cpp" + "src/stc/scintilla/src/AutoComplete.cxx" + "src/stc/scintilla/src/CallTip.cxx" + "src/stc/scintilla/src/CellBuffer.cxx" + "src/stc/scintilla/src/CharClassify.cxx" + "src/stc/scintilla/src/ContractionState.cxx" + "src/stc/scintilla/src/Decoration.cxx" + "src/stc/scintilla/src/Document.cxx" + "src/stc/scintilla/src/DocumentAccessor.cxx" + "src/stc/scintilla/src/Editor.cxx" + "src/stc/scintilla/src/ExternalLexer.cxx" + "src/stc/scintilla/src/Indicator.cxx" + "src/stc/scintilla/src/KeyMap.cxx" + "src/stc/scintilla/src/KeyWords.cxx" + "src/stc/scintilla/src/LexAPDL.cxx" + "src/stc/scintilla/src/LexASY.cxx" + "src/stc/scintilla/src/LexAU3.cxx" + "src/stc/scintilla/src/LexAVE.cxx" + "src/stc/scintilla/src/LexAbaqus.cxx" + "src/stc/scintilla/src/LexAda.cxx" + "src/stc/scintilla/src/LexAsm.cxx" + "src/stc/scintilla/src/LexAsn1.cxx" + "src/stc/scintilla/src/LexBaan.cxx" + "src/stc/scintilla/src/LexBash.cxx" + "src/stc/scintilla/src/LexBasic.cxx" + "src/stc/scintilla/src/LexBullant.cxx" + "src/stc/scintilla/src/LexCLW.cxx" + "src/stc/scintilla/src/LexCOBOL.cxx" + "src/stc/scintilla/src/LexCPP.cxx" + "src/stc/scintilla/src/LexCSS.cxx" + "src/stc/scintilla/src/LexCaml.cxx" + "src/stc/scintilla/src/LexCmake.cxx" + "src/stc/scintilla/src/LexConf.cxx" + "src/stc/scintilla/src/LexCrontab.cxx" + "src/stc/scintilla/src/LexCsound.cxx" + "src/stc/scintilla/src/LexD.cxx" + "src/stc/scintilla/src/LexEScript.cxx" + "src/stc/scintilla/src/LexEiffel.cxx" + "src/stc/scintilla/src/LexErlang.cxx" + "src/stc/scintilla/src/LexFlagship.cxx" + "src/stc/scintilla/src/LexForth.cxx" + "src/stc/scintilla/src/LexFortran.cxx" + "src/stc/scintilla/src/LexGAP.cxx" + "src/stc/scintilla/src/LexGui4Cli.cxx" + "src/stc/scintilla/src/LexHTML.cxx" + "src/stc/scintilla/src/LexHaskell.cxx" + "src/stc/scintilla/src/LexInno.cxx" + "src/stc/scintilla/src/LexKix.cxx" + "src/stc/scintilla/src/LexLisp.cxx" + "src/stc/scintilla/src/LexLout.cxx" + "src/stc/scintilla/src/LexLua.cxx" + "src/stc/scintilla/src/LexMMIXAL.cxx" + "src/stc/scintilla/src/LexMPT.cxx" + "src/stc/scintilla/src/LexMSSQL.cxx" + "src/stc/scintilla/src/LexMagik.cxx" + "src/stc/scintilla/src/LexMarkdown.cxx" + "src/stc/scintilla/src/LexMatlab.cxx" + "src/stc/scintilla/src/LexMetapost.cxx" + "src/stc/scintilla/src/LexMySQL.cxx" + "src/stc/scintilla/src/LexNimrod.cxx" + "src/stc/scintilla/src/LexNsis.cxx" + "src/stc/scintilla/src/LexOpal.cxx" + "src/stc/scintilla/src/LexOthers.cxx" + "src/stc/scintilla/src/LexPB.cxx" + "src/stc/scintilla/src/LexPLM.cxx" + "src/stc/scintilla/src/LexPOV.cxx" + "src/stc/scintilla/src/LexPS.cxx" + "src/stc/scintilla/src/LexPascal.cxx" + "src/stc/scintilla/src/LexPerl.cxx" + "src/stc/scintilla/src/LexPowerPro.cxx" + "src/stc/scintilla/src/LexPowerShell.cxx" + "src/stc/scintilla/src/LexProgress.cxx" + "src/stc/scintilla/src/LexPython.cxx" + "src/stc/scintilla/src/LexR.cxx" + "src/stc/scintilla/src/LexRebol.cxx" + "src/stc/scintilla/src/LexRuby.cxx" + "src/stc/scintilla/src/LexSML.cxx" + "src/stc/scintilla/src/LexSQL.cxx" + "src/stc/scintilla/src/LexScriptol.cxx" + "src/stc/scintilla/src/LexSmalltalk.cxx" + "src/stc/scintilla/src/LexSorcus.cxx" + "src/stc/scintilla/src/LexSpecman.cxx" + "src/stc/scintilla/src/LexSpice.cxx" + "src/stc/scintilla/src/LexTACL.cxx" + "src/stc/scintilla/src/LexTADS3.cxx" + "src/stc/scintilla/src/LexTAL.cxx" + "src/stc/scintilla/src/LexTCL.cxx" + "src/stc/scintilla/src/LexTeX.cxx" + "src/stc/scintilla/src/LexVB.cxx" + "src/stc/scintilla/src/LexVHDL.cxx" + "src/stc/scintilla/src/LexVerilog.cxx" + "src/stc/scintilla/src/LexYAML.cxx" + "src/stc/scintilla/src/LineMarker.cxx" + "src/stc/scintilla/src/PerLine.cxx" + "src/stc/scintilla/src/PositionCache.cxx" + "src/stc/scintilla/src/PropSet.cxx" + "src/stc/scintilla/src/RESearch.cxx" + "src/stc/scintilla/src/RunStyles.cxx" + "src/stc/scintilla/src/ScintillaBase.cxx" + "src/stc/scintilla/src/Selection.cxx" + "src/stc/scintilla/src/Style.cxx" + "src/stc/scintilla/src/StyleContext.cxx" + "src/stc/scintilla/src/UniConversion.cxx" + "src/stc/scintilla/src/ViewStyle.cxx" + "src/stc/scintilla/src/WindowAccessor.cxx" + "src/stc/scintilla/src/XPM.cxx" + "src/stc/stc.cpp") + +set(SRCS_TIFF + "src/tiff/libtiff/tif_aux.c" + "src/tiff/libtiff/tif_close.c" + "src/tiff/libtiff/tif_codec.c" + "src/tiff/libtiff/tif_color.c" + "src/tiff/libtiff/tif_compress.c" + "src/tiff/libtiff/tif_dir.c" + "src/tiff/libtiff/tif_dirinfo.c" + "src/tiff/libtiff/tif_dirread.c" + "src/tiff/libtiff/tif_dirwrite.c" + "src/tiff/libtiff/tif_dumpmode.c" + "src/tiff/libtiff/tif_error.c" + "src/tiff/libtiff/tif_extension.c" + "src/tiff/libtiff/tif_fax3.c" + "src/tiff/libtiff/tif_fax3sm.c" + "src/tiff/libtiff/tif_flush.c" + "src/tiff/libtiff/tif_getimage.c" + "src/tiff/libtiff/tif_jpeg.c" + "src/tiff/libtiff/tif_luv.c" + "src/tiff/libtiff/tif_lzw.c" + "src/tiff/libtiff/tif_next.c" + "src/tiff/libtiff/tif_ojpeg.c" + "src/tiff/libtiff/tif_open.c" + "src/tiff/libtiff/tif_packbits.c" + "src/tiff/libtiff/tif_pixarlog.c" + "src/tiff/libtiff/tif_predict.c" + "src/tiff/libtiff/tif_print.c" + "src/tiff/libtiff/tif_read.c" + "src/tiff/libtiff/tif_strip.c" + "src/tiff/libtiff/tif_swab.c" + "src/tiff/libtiff/tif_thunder.c" + "src/tiff/libtiff/tif_tile.c" + "src/tiff/libtiff/tif_unix.c" + "src/tiff/libtiff/tif_version.c" + "src/tiff/libtiff/tif_warning.c" + "src/tiff/libtiff/tif_write.c" + "src/tiff/libtiff/tif_zip.c") + +set(SRCS_UNIX + "src/unix/apptraits.cpp" + "src/unix/appunix.cpp" + "src/unix/dir.cpp" + "src/unix/dlunix.cpp" + #"src/unix/epolldispatcher.cpp" + "src/unix/evtloopunix.cpp" + "src/unix/fdiounix.cpp" + #"src/unix/fswatcher_kqueue.cpp" + #"src/unix/net.cpp" + "src/unix/snglinst.cpp" + "src/unix/sockunix.cpp" + #"src/unix/stackwalk.cpp" + "src/unix/stdpaths.cpp" + "src/unix/threadpsx.cpp" + "src/unix/timerunx.cpp" + "src/unix/utilsunx.cpp") + +set(SRCS_UNIXGTK + "src/unix/dialup.cpp" + "src/unix/displayx11.cpp" + "src/unix/fontenum.cpp" + "src/unix/fontutil.cpp" + #"src/unix/fswatcher_inotify.cpp" + "src/unix/glx11.cpp" + #"src/unix/joystick.cpp" + #"src/unix/mediactrl.cpp" + "src/unix/mimetype.cpp" + "src/unix/sound.cpp" + #"src/unix/sound_sdl.cpp" + #"src/unix/taskbarx11.cpp" + "src/unix/uiactionx11.cpp" + "src/unix/utilsx11.cpp") + +set(SRCS_XRC + "src/xml/xml.cpp" + "src/xrc/xh_animatctrl.cpp" + "src/xrc/xh_bmp.cpp" + "src/xrc/xh_bmpbt.cpp" + "src/xrc/xh_bmpcbox.cpp" + "src/xrc/xh_bttn.cpp" + "src/xrc/xh_cald.cpp" + "src/xrc/xh_chckb.cpp" + "src/xrc/xh_chckl.cpp" + "src/xrc/xh_choic.cpp" + "src/xrc/xh_choicbk.cpp" + "src/xrc/xh_clrpicker.cpp" + "src/xrc/xh_cmdlinkbn.cpp" + "src/xrc/xh_collpane.cpp" + "src/xrc/xh_combo.cpp" + "src/xrc/xh_comboctrl.cpp" + "src/xrc/xh_datectrl.cpp" + "src/xrc/xh_dirpicker.cpp" + "src/xrc/xh_dlg.cpp" + "src/xrc/xh_editlbox.cpp" + "src/xrc/xh_filectrl.cpp" + "src/xrc/xh_filepicker.cpp" + "src/xrc/xh_fontpicker.cpp" + "src/xrc/xh_frame.cpp" + "src/xrc/xh_gauge.cpp" + "src/xrc/xh_gdctl.cpp" + "src/xrc/xh_grid.cpp" + "src/xrc/xh_html.cpp" + "src/xrc/xh_htmllbox.cpp" + "src/xrc/xh_hyperlink.cpp" + "src/xrc/xh_listb.cpp" + "src/xrc/xh_listbk.cpp" + "src/xrc/xh_listc.cpp" + "src/xrc/xh_mdi.cpp" + "src/xrc/xh_menu.cpp" + "src/xrc/xh_notbk.cpp" + "src/xrc/xh_odcombo.cpp" + "src/xrc/xh_panel.cpp" + "src/xrc/xh_propdlg.cpp" + "src/xrc/xh_radbt.cpp" + "src/xrc/xh_radbx.cpp" + "src/xrc/xh_richtext.cpp" + "src/xrc/xh_scrol.cpp" + "src/xrc/xh_scwin.cpp" + "src/xrc/xh_sizer.cpp" + "src/xrc/xh_slidr.cpp" + "src/xrc/xh_spin.cpp" + "src/xrc/xh_split.cpp" + "src/xrc/xh_srchctrl.cpp" + "src/xrc/xh_statbar.cpp" + "src/xrc/xh_stbmp.cpp" + "src/xrc/xh_stbox.cpp" + "src/xrc/xh_stlin.cpp" + "src/xrc/xh_sttxt.cpp" + "src/xrc/xh_text.cpp" + "src/xrc/xh_tglbtn.cpp" + "src/xrc/xh_toolb.cpp" + "src/xrc/xh_toolbk.cpp" + "src/xrc/xh_tree.cpp" + "src/xrc/xh_treebk.cpp" + "src/xrc/xh_unkwn.cpp" + "src/xrc/xh_wizrd.cpp" + "src/xrc/xmladv.cpp" + "src/xrc/xmlres.cpp" + "src/xrc/xmlrsall.cpp") + +set(SRCS_ZLIB + "src/zlib/adler32.c" + "src/zlib/compress.c" + "src/zlib/crc32.c" + "src/zlib/deflate.c" + "src/zlib/gzio.c" + "src/zlib/infback.c" + "src/zlib/inffast.c" + "src/zlib/inflate.c" + "src/zlib/inftrees.c" + "src/zlib/trees.c" + "src/zlib/uncompr.c" + "src/zlib/zutil.c") + +include_directories(.) +include_directories(include) +include_directories(../libpng) + +set(SRCS + ${SRCS_AUI} + ${SRCS_COMMON} + ${SRCS_GENERIC}) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(SRCS + ${SRCS} + ${SRCS_GENERICOSX} + ${SRCS_OSX} + ${SRCS_UNIX}) +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(SRCS + ${SRCS} + ${SRCS_GENERICGTK} + ${SRCS_GTK} + ${SRCS_UNIX} + ${SRCS_UNIXGTK}) +else() + set(SRCS + ${SRCS} + ${SRCS_MSW}) +endif() + +add_definitions(-D__WXOSX_COCOA__) +add_definitions(-DWXBUILDING) +add_definitions(-Wno-deprecated-declarations) +add_definitions(-Wno-shadow) + +add_library(wx STATIC ${SRCS}) From 7417ecf67fc03e7ff06678523f4add4f1e0a365d Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 00:57:51 +0100 Subject: [PATCH 05/30] Tell the linker to not treat its input as Objective C/C++ source. Flags in CMAKE_CXX_FLAGS are passed to both compile and link commands. A cleaner solution would be to use set_source_files_properties(). However, currently there are headers (StdThread.h, maybe more) that contain Objective syntax. So it is not easy to determine exactly which source files should be compiled as Objective C/C++ and that set can quickly change when certain #include directives are modified. The solution for that would be to move all uses of Objective syntax to implementation (.cpp) files and then apply set_source_files_properties() to those. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e13aef68b..d9f5471033 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,6 +102,7 @@ endif() if (APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none") FIND_LIBRARY(ATB_LIBRARY AudioToolbox) FIND_LIBRARY(AU_LIBRARY AudioUnit) FIND_LIBRARY(CARBON_LIBRARY Carbon) From 20fa8bb9f227c3e694410b145311513e8299bf6e Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 01:10:45 +0100 Subject: [PATCH 06/30] Fixed linking to wxWidgets built from Externals under OS X. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d9f5471033..dcef6157bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -439,10 +439,12 @@ if(NOT DISABLE_WX) include_directories(Externals/wxWidgets3) include_directories(Externals/wxWidgets3/include) add_subdirectory(Externals/wxWidgets3) + set(wxWidgets_LIBRARIES "${CMAKE_BINARY_DIR}/Externals/wxWidgets3/libwx.a") else() include_directories(Externals/wxWidgets/include) add_subdirectory(Externals/wxWidgets) endif() + set(wxWidgets_FOUND TRUE) endif(wxWidgets_FOUND) add_definitions(-DHAVE_WX=1) endif(NOT DISABLE_WX) From 8c3775ee6ff4adf94497068587648582731eebe4 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 01:12:09 +0100 Subject: [PATCH 07/30] Under OS X, link GL plugin against Cg framework instead of Cg library. --- Source/Plugins/Plugin_VideoOGL/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt index c57106645f..b506087106 100644 --- a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt +++ b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt @@ -22,8 +22,10 @@ if(wxWidgets_FOUND) set(LIBS ${LIBS} ${wxWidgets_LIBRARIES}) endif(wxWidgets_FOUND) -if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux") +if(WIN32 OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LIBS ${LIBS} Cg CgGL) +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + list(APPEND LIBS "${CMAKE_SOURCE_DIR}/Externals/Cg/Cg.framework") endif() if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") From 7ebb0e526f96f4889eeb5366fad7a66110573cf3 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 05:10:21 +0100 Subject: [PATCH 08/30] Added CMakeLists.txt for libpng. The vast majority of the changes in this commit were originally done by Shawn Hoffman in commit c86846cf9c995d8e0463419bd9477b0dae884929. --- Externals/libpng/CMakeLists.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Externals/libpng/CMakeLists.txt diff --git a/Externals/libpng/CMakeLists.txt b/Externals/libpng/CMakeLists.txt new file mode 100644 index 0000000000..52d34af6a7 --- /dev/null +++ b/Externals/libpng/CMakeLists.txt @@ -0,0 +1,19 @@ +set(SRCS + "png.c" + "pngerror.c" + "pngget.c" + "pngmem.c" + "pngpread.c" + "pngread.c" + "pngrio.c" + "pngrtran.c" + "pngrutil.c" + "pngset.c" + "pngtrans.c" + "pngwio.c" + "pngwrite.c" + "pngwtran.c" + "pngwutil.c" + ) + +add_library(png STATIC ${SRCS}) From bb182d88b7f7b8f577709bd34811f474237e4355 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 05:26:28 +0100 Subject: [PATCH 09/30] Link against systemwide OpenCL on OS X. --- CMakeLists.txt | 4 +++- Source/Core/VideoCommon/CMakeLists.txt | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dcef6157bb..1878897105 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -379,7 +379,9 @@ else() check_lib(CGGL CgGL Cg/cgGL.h) endif() -if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + find_library(CL OpenCL) +else() include_directories(Externals/CLRun/include) add_subdirectory(Externals/CLRun) endif() diff --git a/Source/Core/VideoCommon/CMakeLists.txt b/Source/Core/VideoCommon/CMakeLists.txt index 481ced250a..d0e28f571c 100644 --- a/Source/Core/VideoCommon/CMakeLists.txt +++ b/Source/Core/VideoCommon/CMakeLists.txt @@ -40,6 +40,10 @@ set(SRCS Src/BPFunctions.cpp Src/memcpy_amd.cpp) set(LIBS core) +if(NOT ${CL} STREQUAL CL-NOTFOUND) + list(APPEND LIBS ${CL}) +endif() + if(wxWidgets_FOUND AND WIN32) set(SRCS ${SRCS} Src/EmuWindow.cpp) endif() From d440dfe9b2a10d67e4cc547a030f58b53b0a141f Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 05:33:35 +0100 Subject: [PATCH 10/30] Link against systemwide LZO using the info gathered by check_lib(). --- CMakeLists.txt | 1 + Source/Core/DolphinWX/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1878897105..416637e580 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -311,6 +311,7 @@ else() message("Shared lzo not found, falling back to the static library") add_subdirectory(Externals/LZO) include_directories(Externals/LZO) + set(LZO lzo2) endif() include(FindSDL OPTIONAL) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 438ee9ce82..837b58a528 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -1,5 +1,5 @@ set(LIBS core - lzo2 + ${LZO} discio bdisasm inputcommon From 54ea98b0a9a9c30fbe7ec05539d1795ed6385979 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 05:39:41 +0100 Subject: [PATCH 11/30] Refer to the wxWidgets libary as "wx" instead of its full path name. This ensures that additional library dependencies declared for "wx" using target_link_libraries() are applied. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 416637e580..9e84217892 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -442,7 +442,7 @@ if(NOT DISABLE_WX) include_directories(Externals/wxWidgets3) include_directories(Externals/wxWidgets3/include) add_subdirectory(Externals/wxWidgets3) - set(wxWidgets_LIBRARIES "${CMAKE_BINARY_DIR}/Externals/wxWidgets3/libwx.a") + set(wxWidgets_LIBRARIES "wx") else() include_directories(Externals/wxWidgets/include) add_subdirectory(Externals/wxWidgets) From 24dcb7922c8b659844c4e531121219782dff3532 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 05:42:02 +0100 Subject: [PATCH 12/30] On OS X, compile only against standard system libs and Externals. Libraries from MacPorts, Fink or manually installed stuff in /usr/local will be ignored. This ensures the binary will work on other machines as well. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e84217892..3611a7cf56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,6 +100,10 @@ if(UNIX AND NOT APPLE) endif() if (APPLE) + # Ignore MacPorts and Fink and any other locally installed packages that + # might prevent building a distributable binary. + set(CMAKE_SYSTEM_PREFIX_PATH /usr) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none") From 958891b4ebd463253d85c51577f52a23237b8208 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 05:49:08 +0100 Subject: [PATCH 13/30] Compile with OpenAL support on OS X. --- Source/Core/AudioCommon/CMakeLists.txt | 50 ++++++++++++------------- Source/Core/AudioCommon/Src/aldlist.cpp | 3 ++ 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/Source/Core/AudioCommon/CMakeLists.txt b/Source/Core/AudioCommon/CMakeLists.txt index 51476a6ea6..be8c58d14a 100644 --- a/Source/Core/AudioCommon/CMakeLists.txt +++ b/Source/Core/AudioCommon/CMakeLists.txt @@ -6,33 +6,33 @@ set(SRCS Src/AudioCommon.cpp set(LIBS "") +if(ALSA_FOUND) + set(SRCS ${SRCS} Src/AlsaSoundStream.cpp) + set(LIBS ${LIBS} ${ALSA_LIBRARIES}) +endif(ALSA_FOUND) + +if(AO_FOUND) + set(SRCS ${SRCS} Src/AOSoundStream.cpp) + set(LIBS ${LIBS} ${AO_LIBRARIES}) +endif(AO_FOUND) + +if(OPENAL_FOUND) + set(SRCS ${SRCS} Src/OpenALStream.cpp Src/aldlist.cpp) + set(LIBS ${LIBS} ${OPENAL_LIBRARY}) +endif(OPENAL_FOUND) + +if(PULSEAUDIO_FOUND) + set(SRCS ${SRCS} Src/PulseAudioStream.cpp) + set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES}) +endif(PULSEAUDIO_FOUND) + +if(WIN32) + set(SRCS ${SRCS} Src/DSoundStream.cpp) + set(SRCS ${SRCS} Src/XAudio2Stream.cpp) +endif(WIN32) + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(SRCS ${SRCS} Src/CoreAudioSoundStream.cpp) -else() - if(ALSA_FOUND) - set(SRCS ${SRCS} Src/AlsaSoundStream.cpp) - set(LIBS ${LIBS} ${ALSA_LIBRARIES}) - endif(ALSA_FOUND) - - if(AO_FOUND) - set(SRCS ${SRCS} Src/AOSoundStream.cpp) - set(LIBS ${LIBS} ${AO_LIBRARIES}) - endif(AO_FOUND) - - if(OPENAL_FOUND) - set(SRCS ${SRCS} Src/OpenALStream.cpp Src/aldlist.cpp) - set(LIBS ${LIBS} openal) - endif(OPENAL_FOUND) - - if(PULSEAUDIO_FOUND) - set(SRCS ${SRCS} Src/PulseAudioStream.cpp) - set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES}) - endif(PULSEAUDIO_FOUND) - - if(WIN32) - set(SRCS ${SRCS} Src/DSoundStream.cpp) - set(SRCS ${SRCS} Src/XAudio2Stream.cpp) - endif(WIN32) endif() add_library(audiocommon STATIC ${SRCS}) diff --git a/Source/Core/AudioCommon/Src/aldlist.cpp b/Source/Core/AudioCommon/Src/aldlist.cpp index 2008842486..69d42148ae 100644 --- a/Source/Core/AudioCommon/Src/aldlist.cpp +++ b/Source/Core/AudioCommon/Src/aldlist.cpp @@ -27,6 +27,9 @@ #ifdef _WIN32 #include "../../../../Externals/OpenAL/include/al.h" #include "../../../../Externals/OpenAL/include/alc.h" +#elif defined(__APPLE__) +#include +#include #else #include #include From 2621d89a41a38732d3bf9f4633f5db5b20407079 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 06:07:10 +0100 Subject: [PATCH 14/30] Link OS X version of wxWidgets against libpng and libiconv. --- Externals/wxWidgets3/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Externals/wxWidgets3/CMakeLists.txt b/Externals/wxWidgets3/CMakeLists.txt index 09437f5b68..f7570c15d5 100644 --- a/Externals/wxWidgets3/CMakeLists.txt +++ b/Externals/wxWidgets3/CMakeLists.txt @@ -1210,7 +1210,6 @@ set(SRCS_ZLIB include_directories(.) include_directories(include) -include_directories(../libpng) set(SRCS ${SRCS_AUI} @@ -1240,5 +1239,11 @@ add_definitions(-D__WXOSX_COCOA__) add_definitions(-DWXBUILDING) add_definitions(-Wno-deprecated-declarations) add_definitions(-Wno-shadow) +set(LIBS iconv) + +include_directories(../libpng) +add_subdirectory(../libpng ../libpng) +list(APPEND LIBS png) add_library(wx STATIC ${SRCS}) +target_link_libraries(wx ${LIBS}) From 8a75351674d60fea94012cdd5e959e4a61d593e8 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 5 Dec 2011 06:18:04 +0100 Subject: [PATCH 15/30] Link against OpenGL using the info gathered by the FindOpenGL module. --- Source/Core/DolphinWX/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 837b58a528..61b1b2a20c 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -8,7 +8,7 @@ set(LIBS core z sfml-network SDL - GL + ${OPENGL_LIBRARIES} ${XRANDR_LIBRARIES} ${X11_LIBRARIES}) From f9133a7376f2f3a6874ce5044c1af2e8b5f4ccd0 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Wed, 7 Dec 2011 08:26:44 +0100 Subject: [PATCH 16/30] Link to the required OS X frameworks. Previously, there was just one list of frameworks regardless of which part of the code depended on which frameworks. Now we keep separate lists for the Dolphin core, the Dolphin GUI and internal use by wxWidgets. --- CMakeLists.txt | 29 +++++++++++++--------------- Externals/wxWidgets3/CMakeLists.txt | 12 +++++++++++- Source/Core/DolphinWX/CMakeLists.txt | 20 +++++++++++++++---- 3 files changed, 40 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3611a7cf56..de5e795044 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,23 +107,20 @@ if (APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none") - FIND_LIBRARY(ATB_LIBRARY AudioToolbox) - FIND_LIBRARY(AU_LIBRARY AudioUnit) - FIND_LIBRARY(CARBON_LIBRARY Carbon) - FIND_LIBRARY(COCOA_LIBRARY Cocoa) - FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio) - FIND_LIBRARY(COREFUND_LIBRARY CoreFoundation) - FIND_LIBRARY(CORESERV_LIBRARY CoreServices) - FIND_LIBRARY(IOB_LIBRARY IOBluetooth) - FIND_LIBRARY(IOK_LIBRARY IOKit) - FIND_LIBRARY(OGL_LIBRARY OpenGL) - FIND_LIBRARY(WEBKIT_LIBRARY WebKit) - SET(EXTRA_LIBS ${ATB_LIBRARY} ${AU_LIBRARY} ${CARBON_LIBRARY} - ${COCOA_LIBRARY} ${COREAUDIO_LIBRARY} ${COREFUND_LIBRARY} - ${CORESERV_LIBRARY} ${IOB_LIBRARY} ${IOK_LIBRARY} ${OGL_LIBRARY} - ${WEBKIT_LIBRARY}) + find_library(APPKIT_LIBRARY AppKit) + find_library(APPSERV_LIBRARY ApplicationServices) + find_library(ATB_LIBRARY AudioToolbox) + find_library(AU_LIBRARY AudioUnit) + find_library(CARBON_LIBRARY Carbon) + find_library(COCOA_LIBRARY Cocoa) + find_library(COREAUDIO_LIBRARY CoreAudio) + find_library(COREFUND_LIBRARY CoreFoundation) + find_library(CORESERV_LIBRARY CoreServices) + find_library(IOB_LIBRARY IOBluetooth) + find_library(IOK_LIBRARY IOKit) + find_library(WEBKIT_LIBRARY WebKit) endif() - + if(WIN32) add_definitions(-D_SECURE_SCL=0) add_definitions(-D_CRT_SECURE_NO_WARNINGS) diff --git a/Externals/wxWidgets3/CMakeLists.txt b/Externals/wxWidgets3/CMakeLists.txt index f7570c15d5..3281e55955 100644 --- a/Externals/wxWidgets3/CMakeLists.txt +++ b/Externals/wxWidgets3/CMakeLists.txt @@ -1239,7 +1239,17 @@ add_definitions(-D__WXOSX_COCOA__) add_definitions(-DWXBUILDING) add_definitions(-Wno-deprecated-declarations) add_definitions(-Wno-shadow) -set(LIBS iconv) +set(LIBS + iconv + ${APPKIT_LIBRARY} + ${APPSERV_LIBRARY} + ${ATB_LIBRARY} + ${CARBON_LIBRARY} + ${COCOA_LIBRARY} + ${COREFUND_LIBRARY} + ${CORESERV_LIBRARY} + ${IOK_LIBRARY} + ) include_directories(../libpng) add_subdirectory(../libpng ../libpng) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 61b1b2a20c..3d6e8df9ca 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -71,10 +71,22 @@ endif() if(WIN32) set(SRCS ${SRCS} Src/stdafx.cpp) -elseif((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND NOT wxWidgets_FOUND) - # TODO -elseif((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND wxWidgets_FOUND) - # TODO +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + list(APPEND LIBS + ${APPKIT_LIBRARY} + ${AU_LIBRARY} + ${COREAUDIO_LIBRARY} + ${COREFUND_LIBRARY} + ${CORESERV_LIBRARY} + ${IOB_LIBRARY} + ${IOK_LIBRARY} + ) + if(wxWidgets_FOUND) + list(APPEND LIBS + ${APPSERV_LIBRARY} + ${COCOA_LIBRARY} + ) + endif() else() set(SRCS ${SRCS} Src/X11Utils.cpp) endif() From 9d2f589f014512565e800048cb0878a75187674b Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 11 Dec 2011 16:07:59 +0100 Subject: [PATCH 17/30] Create application bundle on OS X. --- Source/Core/DolphinWX/CMakeLists.txt | 51 ++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 3d6e8df9ca..0f8fa53d7d 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -72,6 +72,7 @@ endif() if(WIN32) set(SRCS ${SRCS} Src/stdafx.cpp) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + # Link against OS X system frameworks. list(APPEND LIBS ${APPKIT_LIBRARY} ${AU_LIBRARY} @@ -87,6 +88,11 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ${COCOA_LIBRARY} ) endif() + # Add resource files to application bundle. + set(RESOURCES resources/Dolphin.icns) + list(APPEND SRCS ${RESOURCES}) + set_source_files_properties(${RESOURCES} PROPERTIES + MACOSX_PACKAGE_LOCATION Resources) else() set(SRCS ${SRCS} Src/X11Utils.cpp) endif() @@ -96,13 +102,52 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR set(LIBS ${LIBS} usbhid) endif() -if(wxWidgets_FOUND) - set(DOLPHIN_EXE dolphin-emu) +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(DOLPHIN_EXE_BASE Dolphin) else() - set(DOLPHIN_EXE dolphin-emu-nogui) + set(DOLPHIN_EXE_BASE dolphin-emu) +endif() +if(wxWidgets_FOUND) + set(DOLPHIN_EXE ${DOLPHIN_EXE_BASE}) +else() + set(DOLPHIN_EXE ${DOLPHIN_EXE_BASE}-nogui) endif() add_executable(${DOLPHIN_EXE} ${SRCS}) target_link_libraries(${DOLPHIN_EXE} ${LIBS} ${WXLIBS}) install(TARGETS ${DOLPHIN_EXE} RUNTIME DESTINATION ${bindir}) +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + include(BundleUtilities) + set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${DOLPHIN_EXE}.app) + + # Ask for an application bundle. + set_target_properties(${DOLPHIN_EXE} PROPERTIES + MACOSX_BUNDLE true + MACOSX_BUNDLE_BUNDLE_NAME Dolphin + MACOSX_BUNDLE_ICON_FILE Dolphin.icns + MACOSX_BUNDLE_GUI_IDENTIFIER com.dolphin-emulator.dolphin + MACOSX_BUNDLE_SHORT_VERSION_STRING ${DOLPHIN_WC_DESCRIBE} + MACOSX_BUNDLE_LONG_VERSION_STRING ${DOLPHIN_WC_REVISION} + ) + + # Install Cg framework into application bundle. + copy_resolved_framework_into_bundle( + # Our framework in "Externals" does not have "Versions/Current/" in + # its path; work around the missing directory levels using "././". + "${CMAKE_SOURCE_DIR}/Externals/Cg/Cg.framework/././Cg" + "${BUNDLE_PATH}/Contents/Frameworks/Cg.framework/././Cg" + ) + + # Fix up the bundle after it is finished. + # There does not seem to be an easy way to run CMake commands post-build, + # so we invoke CMake again on a generated script. + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/postprocess_bundle.cmake " + include(BundleUtilities) + message(\"Fixing up application bundle: ${BUNDLE_PATH}\") + fixup_bundle(\"${BUNDLE_PATH}\" \"\" \"\") + ") + add_custom_command(TARGET ${DOLPHIN_EXE} POST_BUILD + COMMAND ${CMAKE_COMMAND} -P postprocess_bundle.cmake + ) +endif() From c1cf4f80cfb03e9961adecc4f4518d89879b9fed Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 11 Dec 2011 16:21:17 +0100 Subject: [PATCH 18/30] Added bundle version and copyright string to OS X bundle info. --- CMakeLists.txt | 20 ++++++++++++-------- Source/Core/DolphinWX/CMakeLists.txt | 2 ++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de5e795044..823bc6c618 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,15 @@ if(GIT_FOUND AND NOT DOLPHIN_WC_REVISION) OUTPUT_STRIP_TRAILING_WHITESPACE) endif() +# version number +set(DOLPHIN_VERSION_MAJOR "3") +set(DOLPHIN_VERSION_MINOR "0") +if(DOLPHIN_IS_STABLE) + set(DOLPHIN_VERSION_PATCH "0") +else() + set(DOLPHIN_VERSION_PATCH ${DOLPHIN_WC_REVISION}) +endif() + # Various compile flags add_definitions(-msse2) @@ -503,14 +512,9 @@ endif() # packaging information set(CPACK_PACKAGE_NAME "dolphin-emu") set(CPACK_PACKAGE_VENDOR "Dolphin Team") -set(CPACK_PACKAGE_VERSION_MAJOR "3") -set(CPACK_PACKAGE_VERSION_MINOR "0") - -if(DOLPHIN_IS_STABLE) - set(CPACK_PACKAGE_VERSION_PATCH "0") -else() - set(CPACK_PACKAGE_VERSION_PATCH ${DOLPHIN_WC_REVISION}) -endif() +set(CPACK_PACKAGE_VERSION_MAJOR ${DOLPHIN_VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${DOLPHIN_VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${DOLPHIN_VERSION_PATCH}) # TODO: CPACK_PACKAGE_DESCRIPTION_FILE # TODO: CPACK_PACKAGE_DESCRIPTION_SUMMARY diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 0f8fa53d7d..7979b5cc58 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -129,6 +129,8 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") MACOSX_BUNDLE_GUI_IDENTIFIER com.dolphin-emulator.dolphin MACOSX_BUNDLE_SHORT_VERSION_STRING ${DOLPHIN_WC_DESCRIBE} MACOSX_BUNDLE_LONG_VERSION_STRING ${DOLPHIN_WC_REVISION} + MACOSX_BUNDLE_BUNDLE_VERSION "${DOLPHIN_VERSION_MAJOR}.${DOLPHIN_VERSION_MINOR}" + MACOSX_BUNDLE_COPYRIGHT "Licensed under GPL version 2" ) # Install Cg framework into application bundle. From 780e5e7244b0e2e35eef71c058259caf8aa1d620 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 11 Dec 2011 16:54:37 +0100 Subject: [PATCH 19/30] Use a custom template to generate the Info.plist for the OS X bundle. This allows us to add keys that don't exist in the CMake template. I added the keys from the Info.plist that was generated by our SCons build to the new template. --- Source/Core/DolphinWX/CMakeLists.txt | 8 +--- Source/Core/DolphinWX/Info.plist.in | 63 ++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 7 deletions(-) create mode 100644 Source/Core/DolphinWX/Info.plist.in diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 7979b5cc58..91c1c1b58f 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -124,13 +124,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Ask for an application bundle. set_target_properties(${DOLPHIN_EXE} PROPERTIES MACOSX_BUNDLE true - MACOSX_BUNDLE_BUNDLE_NAME Dolphin - MACOSX_BUNDLE_ICON_FILE Dolphin.icns - MACOSX_BUNDLE_GUI_IDENTIFIER com.dolphin-emulator.dolphin - MACOSX_BUNDLE_SHORT_VERSION_STRING ${DOLPHIN_WC_DESCRIBE} - MACOSX_BUNDLE_LONG_VERSION_STRING ${DOLPHIN_WC_REVISION} - MACOSX_BUNDLE_BUNDLE_VERSION "${DOLPHIN_VERSION_MAJOR}.${DOLPHIN_VERSION_MINOR}" - MACOSX_BUNDLE_COPYRIGHT "Licensed under GPL version 2" + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in ) # Install Cg framework into application bundle. diff --git a/Source/Core/DolphinWX/Info.plist.in b/Source/Core/DolphinWX/Info.plist.in new file mode 100644 index 0000000000..e365e462ae --- /dev/null +++ b/Source/Core/DolphinWX/Info.plist.in @@ -0,0 +1,63 @@ + + + + + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + ciso + dol + elf + gcm + gcz + iso + wad + + CFBundleTypeIconFile + Dolphin.icns + CFBundleTypeName + Nintendo GC/Wii file + CFBundleTypeRole + Viewer + + + CFBundleExecutable + Dolphin + CFBundleIconFile + Dolphin.icns + CFBundleIdentifier + com.dolphin-emulator.dolphin + CFBundleDevelopmentRegion + English + CFBundleLocalizations + + ar + el + en + es + fr + hu + pt + pt_BR + tr + + CFBundlePackageType + APPL + CFBundleShortVersionString + ${DOLPHIN_WC_DESCRIBE} + CFBundleLongVersionString + ${DOLPHIN_WC_REVISION} + CFBundleVersion + ${DOLPHIN_VERSION_MAJOR}.${DOLPHIN_VERSION_MINOR} + NSHumanReadableCopyright + Licensed under GPL version 2 + LSMinimumSystemVersion + 10.5.4 + LSRequiresCarbon + + CSResourcesFileMapped + + + From 9ede977a56017ee6d67f4f83601a89f495ab4d82 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 11 Dec 2011 21:24:40 +0100 Subject: [PATCH 20/30] Added QuickTime framework as dependency for wxWidgets on OS X. It seems that the required functions are in an already included framework on x86_64, but on i386 we depend on QuickTime. --- CMakeLists.txt | 1 + Externals/wxWidgets3/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 823bc6c618..a1a28c4109 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,6 +127,7 @@ if (APPLE) find_library(CORESERV_LIBRARY CoreServices) find_library(IOB_LIBRARY IOBluetooth) find_library(IOK_LIBRARY IOKit) + find_library(QUICKTIME_LIBRARY QuickTime) find_library(WEBKIT_LIBRARY WebKit) endif() diff --git a/Externals/wxWidgets3/CMakeLists.txt b/Externals/wxWidgets3/CMakeLists.txt index 3281e55955..29d349f179 100644 --- a/Externals/wxWidgets3/CMakeLists.txt +++ b/Externals/wxWidgets3/CMakeLists.txt @@ -1249,6 +1249,7 @@ set(LIBS ${COREFUND_LIBRARY} ${CORESERV_LIBRARY} ${IOK_LIBRARY} + ${QUICKTIME_LIBRARY} ) include_directories(../libpng) From 344ca5d360e7881204d3246e2790516b248a5a15 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sun, 11 Dec 2011 21:27:06 +0100 Subject: [PATCH 21/30] Applied compile and link flags from SCons build for OS X to CMake build. The following changes were made: Restricted the "-march=core2" option to i386 because the first Intel Macs had Intel Core CPUs, not Core2. Removed the "-mdynamic-no-pic" flag as GCC lists it as a PPC specific flag. Removed "-Wl,-read_only_relocs,suppress" because it seems to be related to "-mdynamic-no-pic" and I see no need for it. Removed "-Wextra-tokens -Wnewline-eof" because they are GCC specific and not OS X specific. --- CMakeLists.txt | 37 ++++++++++++++++++++++++++++- Source/Core/DolphinWX/Info.plist.in | 2 +- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a1a28c4109..6139ba4080 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,9 +113,44 @@ if (APPLE) # might prevent building a distributable binary. set(CMAKE_SYSTEM_PREFIX_PATH /usr) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++") + # Some of our code contains Objective C constructs. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++") + # Avoid mistaking an object file for a source file on the link command line. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none") + + # Identify the target system: + # Ask for 32/64-bit fat binary. + set(TARGET_FLAGS "-arch x86_64 -arch i386") + # Minimum OS X version. + # This is inserted into the Info.plist as well. + # Note that the SDK determines the maximum version of which optional + # features can be used, not the minimum required version to run. + set(OSX_MIN_VERSION "10.5.4") + set(TARGET_FLAGS "${TARGET_FLAGS} -mmacosx-version-min=${OSX_MIN_VERSION}") + set(TARGET_FLAGS "${TARGET_FLAGS} -isysroot /Developer/SDKs/MacOSX10.6.sdk") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk") + # Specify target CPUs. + set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_i386 -msse3") + set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_i386 -march=prescott") + set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_x86_64 -mssse3") + set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_x86_64 -march=core2") + message("target flags: ${TARGET_FLAGS}") + # Target flags apply to both C and C++ compilation. + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_FLAGS}") + # TODO: It seems that CMake passes compile flags to the linker anyway. + #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TARGET_FLAGS}") + message("C++ flags: ${CMAKE_CXX_FLAGS}") + + # Linker flags. + # Drop unreachable code and data. + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-dead_strip,-dead_strip_dylibs") + # Reserve the minimum size for the zero page. + # Our JIT requires virtual memory space below 2GB, while the default zero + # page on x86_64 is 4GB in size. + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-pagezero_size,0x1000") + find_library(APPKIT_LIBRARY AppKit) find_library(APPSERV_LIBRARY ApplicationServices) find_library(ATB_LIBRARY AudioToolbox) diff --git a/Source/Core/DolphinWX/Info.plist.in b/Source/Core/DolphinWX/Info.plist.in index e365e462ae..9a05a972c8 100644 --- a/Source/Core/DolphinWX/Info.plist.in +++ b/Source/Core/DolphinWX/Info.plist.in @@ -54,7 +54,7 @@ NSHumanReadableCopyright Licensed under GPL version 2 LSMinimumSystemVersion - 10.5.4 + ${OSX_MIN_VERSION} LSRequiresCarbon CSResourcesFileMapped From 7423c74deb5d1b092fc9386c11305d8983327288 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 12 Dec 2011 00:43:23 +0100 Subject: [PATCH 22/30] Force the "ebx" argument to be mapped to a register (not necessarily EBX). Fixes crash on x86 under OS X. Thanks to kiesel for the fix and to shuffle2 for remembering the problem. --- Source/Core/Common/Src/CPUDetect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index 7c231b0a69..33efef7c01 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -48,7 +48,7 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, "movl %%ebx,%1;" "mov %%rdi,%%rbx;" : "=a" (*eax), - "=g" (*ebx), + "=r" (*ebx), "=c" (*ecx), "=d" (*edx) : "a" (*eax) @@ -61,7 +61,7 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, "movl %%ebx,%1;" "movl %%edi,%%ebx;" : "=a" (*eax), - "=g" (*ebx), + "=r" (*ebx), "=c" (*ecx), "=d" (*edx) : "a" (*eax) From d75f45979b236713a232b7e86c481548eaa7fa5d Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 12 Dec 2011 01:30:42 +0100 Subject: [PATCH 23/30] Copy data files into OS X application bundle. --- Source/Core/DolphinWX/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 91c1c1b58f..fe8b90ed80 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -146,4 +146,15 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") add_custom_command(TARGET ${DOLPHIN_EXE} POST_BUILD COMMAND ${CMAKE_COMMAND} -P postprocess_bundle.cmake ) + + # Copy data files into application bundle. + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/copy_data_into_bundle.cmake " + file(INSTALL ${CMAKE_SOURCE_DIR}/Data/Sys ${CMAKE_SOURCE_DIR}/Data/User + DESTINATION ${BUNDLE_PATH}/Contents/Resources + ) + ") + add_custom_target(CopyDataIntoBundle ALL + COMMAND ${CMAKE_COMMAND} -P copy_data_into_bundle.cmake + VERBATIM + ) endif() From ee5a29e6f2010eea7d9953a875f5ff7dc8149fda Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 12 Dec 2011 02:14:56 +0100 Subject: [PATCH 24/30] For CPUID, save EBX on the stack instead of in a register. This fixes GCC running out of registers when compiling for x86 in release mode. Thanks to kiesel. --- Source/Core/Common/Src/CPUDetect.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index 33efef7c01..99e43f5c46 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -43,29 +43,27 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, // Note: EBX is reserved on Mac OS X and in PIC on Linux, so it has to // restored at the end of the asm block. __asm__ ( - "mov %%rbx,%%rdi;" + "pushq %%rbx;" "cpuid;" "movl %%ebx,%1;" - "mov %%rdi,%%rbx;" + "popq %%rbx;" : "=a" (*eax), - "=r" (*ebx), + "=S" (*ebx), "=c" (*ecx), "=d" (*edx) : "a" (*eax) - : "rdi", "rbx" ); #else - __asm__( - "movl %%ebx,%%edi;" + __asm__ ( + "pushl %%ebx;" "cpuid;" - "movl %%ebx,%1;" - "movl %%edi,%%ebx;" + "movl %%ebx,%1;" + "popl %%ebx;" : "=a" (*eax), - "=r" (*ebx), + "=S" (*ebx), "=c" (*ecx), "=d" (*edx) : "a" (*eax) - : "edi", "ebx" ); #endif } From 4c7c29b8b6bfe810f298d0007c505720beaa1c36 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Wed, 14 Dec 2011 02:50:36 +0100 Subject: [PATCH 25/30] Let "make install" on OS X copy the bundle to /Applications. The "dsptool" executable is not included in the bundle. The "tester" executable is not included in the bundle and it no longer installed on other platforms, since it is neither expected nor useful to install unit tests. --- CMakeLists.txt | 20 ++++++++++++++------ Source/Core/DolphinWX/CMakeLists.txt | 8 +++++++- Source/DSPTool/CMakeLists.txt | 4 +++- Source/UnitTests/CMakeLists.txt | 1 - 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6139ba4080..a30fbcdd9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,11 +7,17 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/CMakeTests) set(DOLPHIN_IS_STABLE FALSE) # Set up paths -set(bindir ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "bindir") -set(datadir ${CMAKE_INSTALL_PREFIX}/share/dolphin-emu CACHE PATH "datadir") +if((${CMAKE_SYSTEM_NAME} MATCHES "Darwin")) + # The gettext module will install the translations unconditionally. + # Redirect the installation to a build directory where it does no harm. + set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install-dummy) +else() + set(bindir ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "bindir") + set(datadir ${CMAKE_INSTALL_PREFIX}/share/dolphin-emu CACHE PATH "datadir") + add_definitions(-DDATA_DIR="${datadir}/") +endif() set(userdir ".dolphin-emu" CACHE STRING "User directory") add_definitions(-DUSER_DIR="${userdir}") -add_definitions(-DDATA_DIR="${datadir}/") # Set where the binary files will be built. The program will not execute from # here. You must run "make install" to install these to the proper location @@ -534,14 +540,16 @@ add_subdirectory(Source) ######################################## # Install shared data files # -install(DIRECTORY Data/User/ DESTINATION ${datadir}/user PATTERN .svn EXCLUDE) -install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/sys PATTERN .svn EXCLUDE) +if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")) + install(DIRECTORY Data/User/ DESTINATION ${datadir}/user PATTERN) + install(DIRECTORY Data/Sys/ DESTINATION ${datadir}/sys PATTERN) +endif() include(FindGettext) if(GETTEXT_FOUND AND NOT DISABLE_WX) file(GLOB LINGUAS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} Languages/po/*.po) GETTEXT_CREATE_TRANSLATIONS(Languages/po/dolphin-emu.pot ALL ${LINGUAS}) endif() -if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")) +if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|Darwin")) install(FILES Data/license.txt DESTINATION ${datadir}) endif() diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index fe8b90ed80..07df3a096d 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -115,7 +115,6 @@ endif() add_executable(${DOLPHIN_EXE} ${SRCS}) target_link_libraries(${DOLPHIN_EXE} ${LIBS} ${WXLIBS}) -install(TARGETS ${DOLPHIN_EXE} RUNTIME DESTINATION ${bindir}) if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") include(BundleUtilities) @@ -157,4 +156,11 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") COMMAND ${CMAKE_COMMAND} -P copy_data_into_bundle.cmake VERBATIM ) + + # Install bundle into systemwide /Applications directory. + install(DIRECTORY ${BUNDLE_PATH} DESTINATION /Applications + USE_SOURCE_PERMISSIONS + ) +else() + install(TARGETS ${DOLPHIN_EXE} RUNTIME DESTINATION ${bindir}) endif() diff --git a/Source/DSPTool/CMakeLists.txt b/Source/DSPTool/CMakeLists.txt index 2e26125fbc..b7415ff703 100644 --- a/Source/DSPTool/CMakeLists.txt +++ b/Source/DSPTool/CMakeLists.txt @@ -1,3 +1,5 @@ add_executable(dsptool Src/DSPTool.cpp) target_link_libraries(dsptool core) -install(TARGETS dsptool RUNTIME DESTINATION ${bindir}) +if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")) + install(TARGETS dsptool RUNTIME DESTINATION ${bindir}) +endif() diff --git a/Source/UnitTests/CMakeLists.txt b/Source/UnitTests/CMakeLists.txt index 323c4f65c7..f86742555e 100644 --- a/Source/UnitTests/CMakeLists.txt +++ b/Source/UnitTests/CMakeLists.txt @@ -4,4 +4,3 @@ set(SRCS AudioJitTests.cpp add_executable(tester ${SRCS}) target_link_libraries(tester core) -install(TARGETS tester RUNTIME DESTINATION ${bindir}) From 27590c3a8f00e0ab1def59badf95afa55d20f6ba Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Thu, 15 Dec 2011 06:41:39 +0100 Subject: [PATCH 26/30] Suppress link warning about QuickTime being 32-bit only. If we are actually missing symbols because a required architecture is missing from a library, we'll get a link error as usual, so suppressing this warning is pretty safe. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a30fbcdd9f..cf0088e73e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,6 +136,9 @@ if (APPLE) set(TARGET_FLAGS "${TARGET_FLAGS} -mmacosx-version-min=${OSX_MIN_VERSION}") set(TARGET_FLAGS "${TARGET_FLAGS} -isysroot /Developer/SDKs/MacOSX10.6.sdk") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk") + # Do not warn about frameworks that are not available on all architectures. + # This avoids a warning when linking with QuickTime. + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_arch_warnings") # Specify target CPUs. set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_i386 -msse3") set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_i386 -march=prescott") From e13f4644bbe6b6234c621d62bead2d2af86bdcc7 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Thu, 15 Dec 2011 06:54:42 +0100 Subject: [PATCH 27/30] Link weakly to OpenCL on OS X. This makes sure Dolphin still loads when OpenCL is not available. OpenCL was added in OS X 10.6, while we also support 10.5. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cf0088e73e..42e3534672 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -437,6 +437,7 @@ endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") find_library(CL OpenCL) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-weak_framework,OpenCL") else() include_directories(Externals/CLRun/include) add_subdirectory(Externals/CLRun) From 5cbc31b052e13857e74baf3523048ad2b5c6c6c6 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Fri, 16 Dec 2011 02:46:55 +0100 Subject: [PATCH 28/30] Lowered wxWidgets version number requirement to 2.8.9. I incorrectly assumed that since wx 2.8.8 lacked wxAuiToolBar, the entire 2.8.x series lacked it. In fact in wx 2.8.9 this feature was added. Thanks to Glenn Rice for spotting this issue. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42e3534672..78a2789404 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -457,8 +457,8 @@ if(NOT DISABLE_WX) ERROR_QUIET ) message("Found wxWidgets version ${wxWidgets_VERSION}") - if(${wxWidgets_VERSION} VERSION_LESS "2.9.0") - message("At least 2.9.0 is required; ignoring found version") + if(${wxWidgets_VERSION} VERSION_LESS "2.8.9") + message("At least 2.8.9 is required; ignoring found version") unset(wxWidgets_FOUND) endif() endif(wxWidgets_FOUND) From 74d552f3cae97d7beb643f52e378a4258dca0772 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sat, 17 Dec 2011 15:31:36 +0100 Subject: [PATCH 29/30] Removed debug prints. --- CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78a2789404..cb1f17d2b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,13 +144,10 @@ if (APPLE) set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_i386 -march=prescott") set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_x86_64 -mssse3") set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_x86_64 -march=core2") - message("target flags: ${TARGET_FLAGS}") # Target flags apply to both C and C++ compilation. + # CMake passes these to the compiler on the link command line as well. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TARGET_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TARGET_FLAGS}") - # TODO: It seems that CMake passes compile flags to the linker anyway. - #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TARGET_FLAGS}") - message("C++ flags: ${CMAKE_CXX_FLAGS}") # Linker flags. # Drop unreachable code and data. From 83bf5790a66363d445b4e4e53cba91c260781e75 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sat, 17 Dec 2011 16:26:52 +0100 Subject: [PATCH 30/30] Copy translation files into OS X bundle. --- Source/Core/DolphinWX/CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 07df3a096d..2d7ed7e0ce 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -151,6 +151,24 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") file(INSTALL ${CMAKE_SOURCE_DIR}/Data/Sys ${CMAKE_SOURCE_DIR}/Data/User DESTINATION ${BUNDLE_PATH}/Contents/Resources ) + file(GLOB TRANSLATION_FILES RELATIVE ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/*.gmo + ) + foreach(TRANSLATION_FILE \${TRANSLATION_FILES}) + string(REPLACE \".gmo\" \".lproj\" TRANSLATION_DIR + \${TRANSLATION_FILE} + ) + # It would be better to copy to the new name as a single action, + # but I can't figure out a way to let CMake do that. + file(COPY ${CMAKE_BINARY_DIR}/\${TRANSLATION_FILE} + DESTINATION ${BUNDLE_PATH}/Contents/Resources/\${TRANSLATION_DIR} + NO_SOURCE_PERMISSIONS + ) + file(RENAME + ${BUNDLE_PATH}/Contents/Resources/\${TRANSLATION_DIR}/\${TRANSLATION_FILE} + ${BUNDLE_PATH}/Contents/Resources/\${TRANSLATION_DIR}/dolphin-emu.mo + ) + endforeach(TRANSLATION_FILE) ") add_custom_target(CopyDataIntoBundle ALL COMMAND ${CMAKE_COMMAND} -P copy_data_into_bundle.cmake