Split large CMakeLists into multiple subdirectory libraries. This will make unit testing easier on a per-component basis
This commit is contained in:
parent
558211e9fe
commit
d307bf47c6
@ -89,51 +89,6 @@ set(PROJECT_SOURCES
|
|||||||
gui/ThrustCurveMotorSelector.ui
|
gui/ThrustCurveMotorSelector.ui
|
||||||
gui/qcustomplot.cpp
|
gui/qcustomplot.cpp
|
||||||
gui/qcustomplot.h
|
gui/qcustomplot.h
|
||||||
model/MotorModel.cpp
|
|
||||||
model/MotorModel.h
|
|
||||||
model/MotorModelDatabase.cpp
|
|
||||||
model/MotorModelDatabase.h
|
|
||||||
model/Rocket.cpp
|
|
||||||
model/Rocket.h
|
|
||||||
model/ThrustCurve.cpp
|
|
||||||
model/ThrustCurve.h
|
|
||||||
sim/AtmosphericModel.h
|
|
||||||
sim/ConstantAtmosphere.h
|
|
||||||
sim/ConstantGravityModel.h
|
|
||||||
sim/DESolver.h
|
|
||||||
sim/Environment.h
|
|
||||||
sim/GeoidModel.h
|
|
||||||
sim/GravityModel.h
|
|
||||||
sim/Propagator.cpp
|
|
||||||
sim/Propagator.h
|
|
||||||
sim/RK4Solver.h
|
|
||||||
sim/SphericalGeoidModel.cpp
|
|
||||||
sim/SphericalGeoidModel.h
|
|
||||||
sim/SphericalGravityModel.cpp
|
|
||||||
sim/SphericalGravityModel.h
|
|
||||||
sim/StateData.h
|
|
||||||
sim/USStandardAtmosphere.cpp
|
|
||||||
sim/USStandardAtmosphere.h
|
|
||||||
sim/WindModel.cpp
|
|
||||||
sim/WindModel.h
|
|
||||||
utils/BinMap.cpp
|
|
||||||
utils/BinMap.h
|
|
||||||
utils/CurlConnection.cpp
|
|
||||||
utils/CurlConnection.h
|
|
||||||
utils/Logger.cpp
|
|
||||||
utils/Logger.h
|
|
||||||
utils/MotorModelDatabase.cpp
|
|
||||||
utils/MotorModelDatabase.h
|
|
||||||
utils/RSEDatabaseLoader.cpp
|
|
||||||
utils/RSEDatabaseLoader.h
|
|
||||||
utils/ThreadPool.cpp
|
|
||||||
utils/ThreadPool.h
|
|
||||||
utils/ThrustCurveAPI.cpp
|
|
||||||
utils/ThrustCurveAPI.h
|
|
||||||
utils/TSQueue.h
|
|
||||||
utils/math/Constants.h
|
|
||||||
utils/math/MathTypes.h
|
|
||||||
utils/math/UtilityMathFunctions.h
|
|
||||||
${TS_FILES}
|
${TS_FILES}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -162,11 +117,26 @@ else()
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#target_link_libraries(qtrocket PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${Qt_VERSION_MAJOR}::PrintSupport libcurl jsoncpp_static fmt::fmt-header-only)
|
add_subdirectory(utils)
|
||||||
target_link_libraries(qtrocket PRIVATE Qt6::Widgets Qt6::PrintSupport libcurl jsoncpp_static fmt::fmt-header-only eigen)
|
add_subdirectory(sim)
|
||||||
|
add_subdirectory(model)
|
||||||
|
|
||||||
|
#target_link_libraries(qtrocket PRIVATE
|
||||||
|
# Qt6::Widgets
|
||||||
|
# Qt6::PrintSupport
|
||||||
|
# libcurl
|
||||||
|
# jsoncpp_static
|
||||||
|
# fmt::fmt-header-only
|
||||||
|
# eigen)
|
||||||
|
|
||||||
|
target_link_libraries(qtrocket PRIVATE
|
||||||
|
Qt6::Widgets
|
||||||
|
Qt6::PrintSupport
|
||||||
|
utils
|
||||||
|
sim
|
||||||
|
model)
|
||||||
|
|
||||||
set_target_properties(qtrocket PROPERTIES
|
set_target_properties(qtrocket PROPERTIES
|
||||||
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
|
MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com
|
||||||
|
12
model/CMakeLists.txt
Normal file
12
model/CMakeLists.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
add_library(model
|
||||||
|
MotorModel.cpp
|
||||||
|
MotorModel.h
|
||||||
|
MotorModelDatabase.cpp
|
||||||
|
MotorModelDatabase.h
|
||||||
|
Rocket.cpp
|
||||||
|
Rocket.h
|
||||||
|
ThrustCurve.cpp
|
||||||
|
ThrustCurve.h)
|
||||||
|
|
||||||
|
target_link_libraries(model PRIVATE
|
||||||
|
utils)
|
24
sim/CMakeLists.txt
Normal file
24
sim/CMakeLists.txt
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
add_library(sim
|
||||||
|
AtmosphericModel.h
|
||||||
|
ConstantAtmosphere.h
|
||||||
|
ConstantGravityModel.h
|
||||||
|
DESolver.h
|
||||||
|
Environment.h
|
||||||
|
GeoidModel.h
|
||||||
|
GravityModel.h
|
||||||
|
Propagator.cpp
|
||||||
|
Propagator.h
|
||||||
|
RK4Solver.h
|
||||||
|
SphericalGeoidModel.cpp
|
||||||
|
SphericalGeoidModel.h
|
||||||
|
SphericalGravityModel.cpp
|
||||||
|
SphericalGravityModel.h
|
||||||
|
StateData.h
|
||||||
|
USStandardAtmosphere.cpp
|
||||||
|
USStandardAtmosphere.h
|
||||||
|
WindModel.cpp
|
||||||
|
WindModel.h)
|
||||||
|
|
||||||
|
target_link_libraries(sim PRIVATE
|
||||||
|
utils)
|
||||||
|
|
25
utils/CMakeLists.txt
Normal file
25
utils/CMakeLists.txt
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
add_library(utils
|
||||||
|
BinMap.cpp
|
||||||
|
BinMap.h
|
||||||
|
CurlConnection.cpp
|
||||||
|
CurlConnection.h
|
||||||
|
Logger.cpp
|
||||||
|
Logger.h
|
||||||
|
MotorModelDatabase.cpp
|
||||||
|
MotorModelDatabase.h
|
||||||
|
RSEDatabaseLoader.cpp
|
||||||
|
RSEDatabaseLoader.h
|
||||||
|
ThreadPool.cpp
|
||||||
|
ThreadPool.h
|
||||||
|
ThrustCurveAPI.cpp
|
||||||
|
ThrustCurveAPI.h
|
||||||
|
TSQueue.h
|
||||||
|
math/Constants.h
|
||||||
|
math/MathTypes.h
|
||||||
|
math/UtilityMathFunctions.h)
|
||||||
|
|
||||||
|
target_link_libraries(utils PUBLIC
|
||||||
|
libcurl
|
||||||
|
jsoncpp_static
|
||||||
|
fmt::fmt-header-only
|
||||||
|
eigen)
|
Loading…
x
Reference in New Issue
Block a user