From 08c4671ac579aec4b90ddcc30857bdbd3545e423 Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Tue, 28 Jul 2015 11:39:15 +0200 Subject: [PATCH] Compile the contrib plugins --- CMakeLists.txt | 2 +- contrib/CMakeLists.txt | 188 +++---------------------- contrib/bkgrnd2d/CMakeLists.txt | 9 ++ contrib/bobtoolz/CMakeLists.txt | 80 +++++++++++ contrib/bobtoolz/dialogs/AboutDialog.h | 2 + contrib/brushexport/CMakeLists.txt | 12 ++ contrib/camera/CMakeLists.txt | 16 +++ contrib/gtkgensurf/CMakeLists.txt | 17 +++ contrib/hydratoolz/CMakeLists.txt | 5 + contrib/prtview/CMakeLists.txt | 15 ++ contrib/shaderplug/CMakeLists.txt | 7 + contrib/sunplug/CMakeLists.txt | 4 + contrib/ufoaiplug/CMakeLists.txt | 11 ++ libs/cmdlib/CMakeLists.txt | 2 +- libs/mathlib/CMakeLists.txt | 2 +- libs/profile/CMakeLists.txt | 2 +- libs/xml/CMakeLists.txt | 4 +- 17 files changed, 201 insertions(+), 177 deletions(-) create mode 100644 contrib/bkgrnd2d/CMakeLists.txt create mode 100644 contrib/bobtoolz/CMakeLists.txt create mode 100644 contrib/brushexport/CMakeLists.txt create mode 100644 contrib/camera/CMakeLists.txt create mode 100644 contrib/gtkgensurf/CMakeLists.txt create mode 100644 contrib/hydratoolz/CMakeLists.txt create mode 100644 contrib/prtview/CMakeLists.txt create mode 100644 contrib/shaderplug/CMakeLists.txt create mode 100644 contrib/sunplug/CMakeLists.txt create mode 100644 contrib/ufoaiplug/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ba761e5..917a5247 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -371,5 +371,5 @@ target_link_libraries(radiant splines stream string - xml + xmllib ) diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 446de8c4..4502b276 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -1,173 +1,19 @@ # Todo split further and actually compile the plugins -set(BKGRND2DLIST - contrib/bkgrnd2d/bkgrnd2d.cpp - contrib/bkgrnd2d/bkgrnd2d.h - contrib/bkgrnd2d/dialog.cpp - contrib/bkgrnd2d/dialog.h - contrib/bkgrnd2d/plugin.cpp - contrib/bkgrnd2d/plugin.h -) - -set(BOBTOOLZLIST - contrib/bobtoolz/dialogs/AboutDialog.cpp - contrib/bobtoolz/dialogs/AboutDialog.h - contrib/bobtoolz/dialogs/AutoCaulkDialog.cpp - contrib/bobtoolz/dialogs/AutoCaulkDialog.h - contrib/bobtoolz/dialogs/AutoCaulkStartDialog.cpp - contrib/bobtoolz/dialogs/AutoCaulkStartDialog.h - contrib/bobtoolz/dialogs/BrushCheckDialog.h - contrib/bobtoolz/dialogs/DoorDialog.cpp - contrib/bobtoolz/dialogs/DoorDialog.h - contrib/bobtoolz/dialogs/IntersectDialog.cpp - contrib/bobtoolz/dialogs/IntersectDialog.h - contrib/bobtoolz/dialogs/IntersectInfoDialog.cpp - contrib/bobtoolz/dialogs/IntersectInfoDialog.h - contrib/bobtoolz/dialogs/PolygonDialog.cpp - contrib/bobtoolz/dialogs/PolygonDialog.h - contrib/bobtoolz/dialogs/StairDialog.cpp - contrib/bobtoolz/dialogs/StairDialog.h - contrib/bobtoolz/dialogs/TextureResetDialog.cpp - contrib/bobtoolz/dialogs/TextureResetDialog.h - contrib/bobtoolz/dialogs/brushcheckdialog.cpp - contrib/bobtoolz/dialogs/dialogs-gtk.cpp - contrib/bobtoolz/dialogs/dialogs-gtk.h - contrib/bobtoolz/dialogs/pathplotterdialog.cpp - contrib/bobtoolz/dialogs/pathplotterdialog.h - contrib/bobtoolz/CPortals.h - contrib/bobtoolz/DBobView.cpp - contrib/bobtoolz/DBobView.h - contrib/bobtoolz/DBrush.cpp - contrib/bobtoolz/DBrush.h - contrib/bobtoolz/DEPair.cpp - contrib/bobtoolz/DEPair.h - contrib/bobtoolz/DEntity.cpp - contrib/bobtoolz/DEntity.h - contrib/bobtoolz/DMap.cpp - contrib/bobtoolz/DMap.h - contrib/bobtoolz/DPatch.cpp - contrib/bobtoolz/DPatch.h - contrib/bobtoolz/DPlane.cpp - contrib/bobtoolz/DPlane.h - contrib/bobtoolz/DPoint.cpp - contrib/bobtoolz/DPoint.h - contrib/bobtoolz/DShape.cpp - contrib/bobtoolz/DShape.h - contrib/bobtoolz/DTrainDrawer.cpp - contrib/bobtoolz/DTrainDrawer.h - contrib/bobtoolz/DTreePlanter.cpp - contrib/bobtoolz/DTreePlanter.h - contrib/bobtoolz/DVisDrawer.cpp - contrib/bobtoolz/DVisDrawer.h - contrib/bobtoolz/DWinding.cpp - contrib/bobtoolz/DWinding.h - contrib/bobtoolz/ScriptParser.cpp - contrib/bobtoolz/ScriptParser.h - contrib/bobtoolz/StdAfx.cpp - contrib/bobtoolz/StdAfx.h - contrib/bobtoolz/bobToolz-GTK.cpp - contrib/bobtoolz/bobToolz.h - contrib/bobtoolz/bsploader.cpp - contrib/bobtoolz/bsploader.h - contrib/bobtoolz/cportals.cpp - contrib/bobtoolz/ctfToolz-GTK.cpp - contrib/bobtoolz/ctfresource_gtk.h - contrib/bobtoolz/funchandlers-GTK.cpp - contrib/bobtoolz/funchandlers-ctf-GTK.cpp - contrib/bobtoolz/funchandlers.cpp - contrib/bobtoolz/funchandlers.h - contrib/bobtoolz/lists.cpp - contrib/bobtoolz/lists.h - contrib/bobtoolz/misc.cpp - contrib/bobtoolz/misc.h - contrib/bobtoolz/resource-gtk.h - contrib/bobtoolz/resource.h - contrib/bobtoolz/shapes.cpp - contrib/bobtoolz/shapes.h - contrib/bobtoolz/visfind.cpp - contrib/bobtoolz/visfind.h -) - -set(BRUSHEXPORTLIST - contrib/brushexport/callbacks.cpp - contrib/brushexport/callbacks.h - contrib/brushexport/export.cpp - contrib/brushexport/export.h - contrib/brushexport/interface.cpp - contrib/brushexport/plugin.cpp - contrib/brushexport/plugin.h - contrib/brushexport/support.cpp - contrib/brushexport/support.h -) - -set(CAMERALIST - contrib/camera/camera.cpp - contrib/camera/camera.h - contrib/camera/dialogs.cpp - contrib/camera/dialogs.h - contrib/camera/dialogs_common.cpp - contrib/camera/funchandlers.cpp - contrib/camera/funchandlers.h - contrib/camera/listener.cpp - contrib/camera/listener.h - contrib/camera/misc.cpp - contrib/camera/misc.h - contrib/camera/renderer.cpp - contrib/camera/renderer.h -) - -set(GTKGENSURFLIST - contrib/gtkgensurf/bitmap.cpp - contrib/gtkgensurf/dec.cpp - contrib/gtkgensurf/face.cpp - contrib/gtkgensurf/font.cpp - contrib/gtkgensurf/gendlgs.cpp - contrib/gtkgensurf/gendlgs.h - contrib/gtkgensurf/genmap.cpp - contrib/gtkgensurf/gensurf.cpp - contrib/gtkgensurf/gensurf.h - contrib/gtkgensurf/heretic.cpp - contrib/gtkgensurf/plugin.cpp - contrib/gtkgensurf/triangle.c - contrib/gtkgensurf/triangle.h - contrib/gtkgensurf/view.cpp -) - -set(HYDRATOOLZLIST - contrib/hydratoolz/plugin.cpp - contrib/hydratoolz/plugin.h -) - -set(PRTVIEWLIST - contrib/prtview/AboutDialog.cpp - contrib/prtview/AboutDialog.h - contrib/prtview/ConfigDialog.cpp - contrib/prtview/ConfigDialog.h - contrib/prtview/LoadPortalFileDialog.cpp - contrib/prtview/LoadPortalFileDialog.h - contrib/prtview/portals.cpp - contrib/prtview/portals.h - contrib/prtview/prtview.cpp - contrib/prtview/prtview.h -) - -set(SHADERPLUGLIST - contrib/shaderplug/shaderplug.cpp - contrib/shaderplug/shaderplug.h -) - -set(SUNPLUGLIST - contrib/sunplug/sunplug.cpp - contrib/sunplug/sunplug.h -) - -set(UFOAIPLUGLIST - contrib/ufoaiplug/ufoai.cpp - contrib/ufoaiplug/ufoai.h - contrib/ufoaiplug/ufoai_filters.cpp - contrib/ufoaiplug/ufoai_filters.h - contrib/ufoaiplug/ufoai_gtk.cpp - contrib/ufoaiplug/ufoai_gtk.h - contrib/ufoaiplug/ufoai_level.cpp - contrib/ufoaiplug/ufoai_level.h -) +macro(radiant_plugin name) + message(STATUS "Found Plugin ${name}") + add_library(${name} MODULE ${ARGN}) +endmacro() + +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins") + +# add_subdirectory(bkgrnd2d) +add_subdirectory(bobtoolz) +add_subdirectory(brushexport) +# add_subdirectory(camera) +# add_subdirectory(gtkgensurf) +# add_subdirectory(hydratoolz) +add_subdirectory(prtview) +add_subdirectory(shaderplug) +add_subdirectory(sunplug) +add_subdirectory(ufoaiplug) diff --git a/contrib/bkgrnd2d/CMakeLists.txt b/contrib/bkgrnd2d/CMakeLists.txt new file mode 100644 index 00000000..3bff0ad5 --- /dev/null +++ b/contrib/bkgrnd2d/CMakeLists.txt @@ -0,0 +1,9 @@ + +radiant_plugin(bkgrnd2d + bkgrnd2d.cpp + bkgrnd2d.h + dialog.cpp + dialog.h + plugin.cpp + plugin.h +) diff --git a/contrib/bobtoolz/CMakeLists.txt b/contrib/bobtoolz/CMakeLists.txt new file mode 100644 index 00000000..8d8a9597 --- /dev/null +++ b/contrib/bobtoolz/CMakeLists.txt @@ -0,0 +1,80 @@ +radiant_plugin(bobtoolz +# dialogs/AboutDialog.cpp +# dialogs/AboutDialog.h +# dialogs/AutoCaulkDialog.cpp +# dialogs/AutoCaulkDialog.h +# dialogs/AutoCaulkStartDialog.cpp +# dialogs/AutoCaulkStartDialog.h +# dialogs/BrushCheckDialog.h +# dialogs/DoorDialog.cpp +# dialogs/DoorDialog.h +# dialogs/IntersectDialog.cpp +# dialogs/IntersectDialog.h +# dialogs/IntersectInfoDialog.cpp +# dialogs/IntersectInfoDialog.h +# dialogs/PolygonDialog.cpp +# dialogs/PolygonDialog.h +# dialogs/StairDialog.cpp +# dialogs/StairDialog.h +# dialogs/TextureResetDialog.cpp +# dialogs/TextureResetDialog.h +# dialogs/brushcheckdialog.cpp + dialogs/dialogs-gtk.cpp + dialogs/dialogs-gtk.h +# dialogs/pathplotterdialog.cpp +# dialogs/pathplotterdialog.h + CPortals.h + DBobView.cpp + DBobView.h + DBrush.cpp + DBrush.h + DEPair.cpp + DEPair.h + DEntity.cpp + DEntity.h + DMap.cpp + DMap.h + DPatch.cpp + DPatch.h + DPlane.cpp + DPlane.h + DPoint.cpp + DPoint.h + DShape.cpp + DShape.h + DTrainDrawer.cpp + DTrainDrawer.h + DTreePlanter.cpp + DTreePlanter.h + DVisDrawer.cpp + DVisDrawer.h + DWinding.cpp + DWinding.h + ScriptParser.cpp + ScriptParser.h +# StdAfx.cpp +# StdAfx.h + bobToolz-GTK.cpp + bobToolz.h + bsploader.cpp + bsploader.h + cportals.cpp +# ctfToolz-GTK.cpp +# ctfresource_gtk.h + funchandlers-GTK.cpp +# funchandlers-ctf-GTK.cpp +# funchandlers.cpp + funchandlers.h + lists.cpp + lists.h + misc.cpp + misc.h +# resource-gtk.h +# resource.h + shapes.cpp + shapes.h + visfind.cpp + visfind.h +) + +target_link_libraries(bobtoolz cmdlib mathlib profile) diff --git a/contrib/bobtoolz/dialogs/AboutDialog.h b/contrib/bobtoolz/dialogs/AboutDialog.h index 64b4eb2c..bc0fa04a 100644 --- a/contrib/bobtoolz/dialogs/AboutDialog.h +++ b/contrib/bobtoolz/dialogs/AboutDialog.h @@ -23,6 +23,8 @@ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 + + // AboutDialog.h : header file // diff --git a/contrib/brushexport/CMakeLists.txt b/contrib/brushexport/CMakeLists.txt new file mode 100644 index 00000000..95f82797 --- /dev/null +++ b/contrib/brushexport/CMakeLists.txt @@ -0,0 +1,12 @@ + +radiant_plugin(brushexport + callbacks.cpp + callbacks.h + export.cpp + export.h + interface.cpp + plugin.cpp + plugin.h + support.cpp + support.h +) diff --git a/contrib/camera/CMakeLists.txt b/contrib/camera/CMakeLists.txt new file mode 100644 index 00000000..194eb9e5 --- /dev/null +++ b/contrib/camera/CMakeLists.txt @@ -0,0 +1,16 @@ + +radiant_plugin(camera + camera.cpp + camera.h + dialogs.cpp + dialogs.h + dialogs_common.cpp + funchandlers.cpp + funchandlers.h + listener.cpp + listener.h + misc.cpp + misc.h + renderer.cpp + renderer.h +) diff --git a/contrib/gtkgensurf/CMakeLists.txt b/contrib/gtkgensurf/CMakeLists.txt new file mode 100644 index 00000000..1ee3fbdb --- /dev/null +++ b/contrib/gtkgensurf/CMakeLists.txt @@ -0,0 +1,17 @@ + +radiant_plugin(gtkgensurf + bitmap.cpp + dec.cpp + face.cpp + font.cpp + gendlgs.cpp + gendlgs.h + genmap.cpp + gensurf.cpp + gensurf.h + heretic.cpp + plugin.cpp + triangle.c + triangle.h + view.cpp +) diff --git a/contrib/hydratoolz/CMakeLists.txt b/contrib/hydratoolz/CMakeLists.txt new file mode 100644 index 00000000..d9cb1837 --- /dev/null +++ b/contrib/hydratoolz/CMakeLists.txt @@ -0,0 +1,5 @@ + +radiant_plugin(hydratoolz + plugin.cpp + plugin.h +) diff --git a/contrib/prtview/CMakeLists.txt b/contrib/prtview/CMakeLists.txt new file mode 100644 index 00000000..66205cfb --- /dev/null +++ b/contrib/prtview/CMakeLists.txt @@ -0,0 +1,15 @@ + +radiant_plugin(prtview + AboutDialog.cpp + AboutDialog.h + ConfigDialog.cpp + ConfigDialog.h + LoadPortalFileDialog.cpp + LoadPortalFileDialog.h + portals.cpp + portals.h + prtview.cpp + prtview.h +) + +target_link_libraries(prtview profile) diff --git a/contrib/shaderplug/CMakeLists.txt b/contrib/shaderplug/CMakeLists.txt new file mode 100644 index 00000000..a8f3e7d4 --- /dev/null +++ b/contrib/shaderplug/CMakeLists.txt @@ -0,0 +1,7 @@ + +radiant_plugin(shaderplug + shaderplug.cpp + shaderplug.h +) + +target_link_libraries(shaderplug xmllib) diff --git a/contrib/sunplug/CMakeLists.txt b/contrib/sunplug/CMakeLists.txt new file mode 100644 index 00000000..24043c98 --- /dev/null +++ b/contrib/sunplug/CMakeLists.txt @@ -0,0 +1,4 @@ +radiant_plugin(sunplug + sunplug.cpp + sunplug.h +) diff --git a/contrib/ufoaiplug/CMakeLists.txt b/contrib/ufoaiplug/CMakeLists.txt new file mode 100644 index 00000000..5989407a --- /dev/null +++ b/contrib/ufoaiplug/CMakeLists.txt @@ -0,0 +1,11 @@ + +radiant_plugin(ufoaiplug + ufoai.cpp + ufoai.h + ufoai_filters.cpp + ufoai_filters.h + ufoai_gtk.cpp + ufoai_gtk.h + ufoai_level.cpp + ufoai_level.h +) diff --git a/libs/cmdlib/CMakeLists.txt b/libs/cmdlib/CMakeLists.txt index d4900034..b37587b6 100644 --- a/libs/cmdlib/CMakeLists.txt +++ b/libs/cmdlib/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(cmdlib +add_library(cmdlib SHARED cmdlib.cpp ) diff --git a/libs/mathlib/CMakeLists.txt b/libs/mathlib/CMakeLists.txt index ad8113d7..9d33ceae 100644 --- a/libs/mathlib/CMakeLists.txt +++ b/libs/mathlib/CMakeLists.txt @@ -1,5 +1,5 @@ -add_library(mathlib +add_library(mathlib SHARED bbox.c line.c m4x4.c diff --git a/libs/profile/CMakeLists.txt b/libs/profile/CMakeLists.txt index c0393b4f..bc5882c5 100644 --- a/libs/profile/CMakeLists.txt +++ b/libs/profile/CMakeLists.txt @@ -1,5 +1,5 @@ -add_library(profile +add_library(profile SHARED file.cpp file.h profile.cpp diff --git a/libs/xml/CMakeLists.txt b/libs/xml/CMakeLists.txt index e5f56cd8..4de0de07 100644 --- a/libs/xml/CMakeLists.txt +++ b/libs/xml/CMakeLists.txt @@ -2,7 +2,7 @@ find_package(LibXml2 REQUIRED) include_directories(${LIBXML2_INCLUDE_DIR}) -add_library(xml +add_library(xmllib SHARED ixml.cpp ixml.h xmlelement.cpp @@ -14,4 +14,4 @@ add_library(xml xmlwriter.cpp xmlwriter.h ) -target_link_libraries(xml ${LIBXML2_LIBRARIES}) +target_link_libraries(xmllib ${LIBXML2_LIBRARIES}) -- 2.39.2