Move scripts to their own subdirectories

pull/3/head
Hleb Valoshka 2019-10-14 20:06:06 +03:00
parent 7cff1728a3
commit 9401a4389e
40 changed files with 77 additions and 79 deletions

View File

@ -12,6 +12,8 @@ foreach(lib ${CELESTIA_LIBS})
add_subdirectory(${lib})
endforeach()
add_subdirectory(celscript)
# These compiled objects are merged with the celengine library
add_subdirectory(celephem)
add_subdirectory(celcompat)

View File

@ -3,16 +3,10 @@ set(CELESTIA_SOURCES
celestiacore.h
configfile.cpp
configfile.h
cmdparser.cpp
cmdparser.h
command.cpp
command.h
destination.cpp
destination.h
eclipsefinder.cpp
eclipsefinder.h
execution.cpp
execution.h
favorites.cpp
favorites.h
helper.cpp
@ -28,38 +22,6 @@ set(CELESTIA_SOURCES
view.h
)
set(CELX_SOURCES
celx_category.cpp
celx_category.h
celx_celestia.cpp
celx_celestia.h
celx.cpp
celx_frame.cpp
celx_frame.h
celx_gl.cpp
celx_gl.h
celx.h
celx_internal.h
celx_misc.cpp
celx_misc.h
celx_object.cpp
celx_object.h
celx_observer.cpp
celx_observer.h
celx_phase.cpp
celx_phase.h
celx_position.cpp
celx_position.h
celx_rotation.cpp
celx_rotation.h
celx_vector.cpp
celx_vector.h
)
if(ENABLE_CELX)
list(APPEND CELESTIA_SOURCES ${CELX_SOURCES})
endif()
if(WIN32)
list(APPEND CELESTIA_SOURCES
avicapture.cpp
@ -72,7 +34,9 @@ elseif(_UNIX AND ENABLE_THEORA)
)
endif()
add_library(celestia STATIC ${CELESTIA_SOURCES})
add_library(celestia STATIC ${CELESTIA_SOURCES}
$<TARGET_OBJECTS:cellegacyscript>
$<TARGET_OBJECTS:celluascript>)
#[[
add_library(celestia SHARED ${CELESTIA_SOURCES})

View File

@ -21,8 +21,8 @@
#include <celengine/boundaries.h>
#include <celengine/overlay.h>
#include <celengine/console.h>
#include "execution.h"
#include "cmdparser.h"
#include <celscript/legacy/execution.h>
#include <celscript/legacy/cmdparser.h>
#include <celengine/multitexture.h>
#ifdef USE_SPICE
#include <celephem/spiceinterface.h>

View File

@ -15,8 +15,8 @@
// #include <celutil/watchable.h>
#include <celengine/solarsys.h>
#include <celengine/overlay.h>
#include "command.h"
#include "execution.h"
#include <celscript/legacy/command.h>
#include <celscript/legacy/execution.h>
#include <celengine/texture.h>
#include <celengine/universe.h>
#include <celengine/render.h>
@ -29,7 +29,7 @@
#include "moviecapture.h"
#include "view.h"
#ifdef CELX
#include "celx.h"
#include <celscript/lua/celx.h>
#endif
class Url;

View File

@ -11,9 +11,9 @@
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <celengine/parser.h>
#include <celutil/debug.h>
#include <celutil/util.h>
#include "cmdparser.h"
#include "favorites.h"
using namespace Eigen;

View File

@ -33,7 +33,7 @@
#include <celutil/winutil.h>
#include <celutil/filetype.h>
#include <celengine/astro.h>
#include <celestia/cmdparser.h>
#include <celscript/legacy/cmdparser.h>
#include <celengine/axisarrow.h>
#include <celengine/planetgrid.h>

View File

@ -0,0 +1,4 @@
add_subdirectory(legacy)
if(ENABLE_CELX)
add_subdirectory(lua)
endif()

View File

@ -0,0 +1,10 @@
set(LEGACY_SOURCES
cmdparser.cpp
cmdparser.h
command.cpp
command.h
execution.cpp
execution.h
)
add_library(cellegacyscript OBJECT ${LEGACY_SOURCES})

View File

@ -20,8 +20,8 @@
#include <celmath/mathlib.h>
#include <celengine/astro.h>
#ifdef CELX
#include "celx.h"
#include "celx_internal.h"
#include <celscript/lua/celx.h>
#include <celscript/lua/celx_internal.h>
#endif
#include <celengine/render.h>
#include <algorithm>

View File

@ -14,10 +14,10 @@
#ifdef USE_GLCONTEXT
#include <celengine/glcontext.h>
#endif
#include "celestiacore.h"
#include "imagecapture.h"
#include <celestia/celestiacore.h>
#include <celestia/imagecapture.h>
#ifdef CELX
#include "celx_internal.h"
#include <celscript/lua/celx_internal.h>
#endif
#include <celengine/multitexture.h>
#include <celutil/util.h>

View File

@ -0,0 +1,29 @@
set(CELX_SOURCES
celx_category.cpp
celx_category.h
celx_celestia.cpp
celx_celestia.h
celx.cpp
celx_frame.cpp
celx_frame.h
celx_gl.cpp
celx_gl.h
celx.h
celx_internal.h
celx_misc.cpp
celx_misc.h
celx_object.cpp
celx_object.h
celx_observer.cpp
celx_observer.h
celx_phase.cpp
celx_phase.h
celx_position.cpp
celx_position.h
celx_rotation.cpp
celx_rotation.h
celx_vector.cpp
celx_vector.h
)
add_library(celluascript OBJECT ${CELX_SOURCES})

View File

@ -14,18 +14,20 @@
#include <cassert>
#include <ctime>
#include <map>
#include <sstream>
#include <utility>
#include <celengine/astro.h>
#include <celengine/asterism.h>
#include "cmdparser.h"
#include <celscript/legacy/cmdparser.h>
#include <celengine/execenv.h>
#include "execution.h"
#include <celscript/legacy/execution.h>
#include <celengine/timeline.h>
#include <celengine/timelinephase.h>
#include <celutil/debug.h>
#include "imagecapture.h"
#include "url.h"
#include <celestia/celestiacore.h>
#include <celestia/imagecapture.h>
#include <celestia/url.h>
#include "celx.h"
#include "celx_internal.h"
#include "celx_misc.h"
#include "celx_vector.h"
@ -40,19 +42,6 @@
#include "celx_category.h"
// Older gcc versions used <strstream> instead of <sstream>.
// This has been corrected in GCC 3.2, but name clashing must
// be avoided
#ifdef __GNUC__
#undef min
#undef max
#endif
#include <sstream>
#include <utility>
#include "celx.h"
#include "celestiacore.h"
using namespace Eigen;
using namespace std;

View File

@ -25,10 +25,10 @@
#include "celx_rotation.h"
#include "celx_vector.h"
#include "celx_category.h"
#include "url.h"
#include "imagecapture.h"
#include "celestiacore.h"
#include "view.h"
#include <celestia/url.h>
#include <celestia/imagecapture.h>
#include <celestia/celestiacore.h>
#include <celestia/view.h>
using namespace Eigen;

View File

@ -12,7 +12,7 @@
#include "celx.h"
#include "celx_internal.h"
#include "celx_frame.h"
#include "celestiacore.h"
#include <celestia/celestiacore.h>
#include <celengine/observer.h>
#include <Eigen/Geometry>

View File

@ -2,10 +2,10 @@
#include <celutil/debug.h>
#include "celx_misc.h"
#include "celx_internal.h"
#include "cmdparser.h"
#include <celscript/legacy/cmdparser.h>
#include <celengine/execenv.h>
#include "execution.h"
#include "celestiacore.h"
#include <celscript/legacy/execution.h>
#include <celestia/celestiacore.h>
LuaState *getLuaStateObject(lua_State*);

View File

@ -20,7 +20,7 @@
#include <celengine/visibleregion.h>
#include <celengine/planetgrid.h>
#include <celengine/multitexture.h>
#include "celestiacore.h"
#include <celestia/celestiacore.h>
using namespace Eigen;
using namespace std;

View File

@ -15,7 +15,7 @@
#include "celx_observer.h"
//#include <celengine/body.h>
//#include <celengine/timelinephase.h>
#include "celestiacore.h"
#include <celestia/celestiacore.h>
#include <Eigen/Geometry>
using namespace std;