forked from mirror/openmw-tes3mp
rewrote the opencs cmake scripts (more compact and no more annoying warnings)
This commit is contained in:
parent
d6a73a2a02
commit
a4872e3217
2 changed files with 113 additions and 36 deletions
|
@ -1,46 +1,75 @@
|
||||||
|
|
||||||
set (OPENCS_SRC
|
set (OPENCS_SRC main.cpp)
|
||||||
main.cpp editor.cpp
|
|
||||||
|
|
||||||
model/doc/documentmanager.cpp model/doc/document.cpp
|
opencs_units (. editor)
|
||||||
|
|
||||||
model/world/universalid.cpp model/world/idcollection.cpp model/world/data.cpp model/world/idtable.cpp
|
|
||||||
model/world/commands.cpp model/world/idtableproxymodel.cpp model/world/record.cpp
|
|
||||||
model/world/columnbase.cpp
|
|
||||||
|
|
||||||
model/tools/tools.cpp model/tools/operation.cpp model/tools/stage.cpp model/tools/verifier.cpp
|
opencs_units (model/doc
|
||||||
model/tools/mandatoryid.cpp model/tools/reportmodel.cpp
|
document
|
||||||
|
|
||||||
view/doc/viewmanager.cpp view/doc/view.cpp view/doc/operations.cpp view/doc/operation.cpp view/doc/subviewfactory.cpp
|
|
||||||
view/doc/subview.cpp
|
|
||||||
|
|
||||||
view/world/table.cpp view/world/tablesubview.cpp view/world/subviews.cpp view/world/util.cpp
|
|
||||||
view/world/dialoguesubview.cpp
|
|
||||||
|
|
||||||
view/tools/reportsubview.cpp view/tools/subviews.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set (OPENCS_HDR
|
opencs_units_noqt (model/doc
|
||||||
editor.hpp
|
documentmanager
|
||||||
|
|
||||||
model/doc/documentmanager.hpp model/doc/document.hpp model/doc/state.hpp
|
|
||||||
|
|
||||||
model/world/universalid.hpp model/world/record.hpp model/world/idcollection.hpp model/world/data.hpp
|
|
||||||
model/world/idtable.hpp model/world/columns.hpp model/world/idtableproxymodel.hpp
|
|
||||||
model/world/commands.hpp model/world/columnbase.hpp
|
|
||||||
|
|
||||||
model/tools/tools.hpp model/tools/operation.hpp model/tools/stage.hpp model/tools/verifier.hpp
|
|
||||||
model/tools/mandatoryid.hpp model/tools/reportmodel.hpp
|
|
||||||
|
|
||||||
view/doc/viewmanager.hpp view/doc/view.hpp view/doc/operations.hpp view/doc/operation.hpp view/doc/subviewfactory.hpp
|
|
||||||
view/doc/subview.hpp view/doc/subviewfactoryimp.hpp
|
|
||||||
|
|
||||||
view/world/table.hpp view/world/tablesubview.hpp view/world/subviews.hpp view/world/util.hpp
|
|
||||||
view/world/dialoguesubview.hpp
|
|
||||||
|
|
||||||
view/tools/reportsubview.hpp view/tools/subviews.hpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
opencs_hdrs_noqt (model/doc
|
||||||
|
state
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
opencs_units (model/world
|
||||||
|
idtable idtableproxymodel
|
||||||
|
)
|
||||||
|
|
||||||
|
opencs_units_noqt (model/world
|
||||||
|
universalid data record idcollection commands columnbase
|
||||||
|
)
|
||||||
|
|
||||||
|
opencs_hdrs_noqt (model/world
|
||||||
|
columns
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
opencs_units (model/tools
|
||||||
|
tools operation reportmodel
|
||||||
|
)
|
||||||
|
|
||||||
|
opencs_units_noqt (model/tools
|
||||||
|
stage verifier mandatoryid
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
opencs_units (view/doc
|
||||||
|
viewmanager view operations operation subview
|
||||||
|
)
|
||||||
|
|
||||||
|
opencs_units_noqt (view/doc
|
||||||
|
subviewfactory
|
||||||
|
)
|
||||||
|
|
||||||
|
opencs_hdrs_noqt (view/doc
|
||||||
|
subviewfactoryimp
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
opencs_units (view/world
|
||||||
|
table tablesubview
|
||||||
|
)
|
||||||
|
|
||||||
|
opencs_units_noqt (view/world
|
||||||
|
dialoguesubview util subviews
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
opencs_units (view/tools
|
||||||
|
reportsubview
|
||||||
|
)
|
||||||
|
|
||||||
|
opencs_units_noqt (view/tools
|
||||||
|
subviews
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
set (OPENCS_US
|
set (OPENCS_US
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -57,7 +86,7 @@ find_package(Qt4 COMPONENTS QtCore QtGui QtXml QtXmlPatterns REQUIRED)
|
||||||
include(${QT_USE_FILE})
|
include(${QT_USE_FILE})
|
||||||
|
|
||||||
qt4_wrap_ui(OPENCS_UI_HDR ${OPENCS_UI})
|
qt4_wrap_ui(OPENCS_UI_HDR ${OPENCS_UI})
|
||||||
qt4_wrap_cpp(OPENCS_MOC_SRC ${OPENCS_HDR})
|
qt4_wrap_cpp(OPENCS_MOC_SRC ${OPENCS_HDR_QT})
|
||||||
qt4_add_resources(OPENCS_RES_SRC ${OPENCS_RES})
|
qt4_add_resources(OPENCS_RES_SRC ${OPENCS_RES})
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
|
@ -29,3 +29,51 @@ get_filename_component(filename ${f} NAME)
|
||||||
configure_file(${source_dir}/${f} ${destination_dir}/${filename} COPYONLY)
|
configure_file(${source_dir}/${f} ${destination_dir}/${filename} COPYONLY)
|
||||||
endforeach (f)
|
endforeach (f)
|
||||||
endmacro (copy_all_files)
|
endmacro (copy_all_files)
|
||||||
|
|
||||||
|
macro (add_file project type file)
|
||||||
|
list (APPEND ${project}${type} ${file})
|
||||||
|
endmacro (add_file)
|
||||||
|
|
||||||
|
macro (add_unit project dir unit)
|
||||||
|
add_file (${project} _HDR ${comp} "${dir}/${unit}.hpp")
|
||||||
|
add_file (${project} _SRC ${comp} "${dir}/${unit}.cpp")
|
||||||
|
endmacro (add_unit)
|
||||||
|
|
||||||
|
macro (add_qt_unit project dir unit)
|
||||||
|
add_file (${project} _HDR ${comp} "${dir}/${unit}.hpp")
|
||||||
|
add_file (${project} _HDR_QT ${comp} "${dir}/${unit}.hpp")
|
||||||
|
add_file (${project} _SRC ${comp} "${dir}/${unit}.cpp")
|
||||||
|
endmacro (add_qt_unit)
|
||||||
|
|
||||||
|
macro (add_hdr project dir unit)
|
||||||
|
add_file (${project} _HDR ${comp} "${dir}/${unit}.hpp")
|
||||||
|
endmacro (add_hdr)
|
||||||
|
|
||||||
|
macro (add_qt_hdr project dir unit)
|
||||||
|
add_file (${project} _HDR ${comp} "${dir}/${unit}.hpp")
|
||||||
|
add_file (${project} _HDR_QT ${comp} "${dir}/${unit}.hpp")
|
||||||
|
endmacro (add_qt_hdr)
|
||||||
|
|
||||||
|
macro (opencs_units dir)
|
||||||
|
foreach (u ${ARGN})
|
||||||
|
add_qt_unit (OPENCS ${dir} ${u})
|
||||||
|
endforeach (u)
|
||||||
|
endmacro (opencs_units)
|
||||||
|
|
||||||
|
macro (opencs_units_noqt dir)
|
||||||
|
foreach (u ${ARGN})
|
||||||
|
add_unit (OPENCS ${dir} ${u})
|
||||||
|
endforeach (u)
|
||||||
|
endmacro (opencs_units)
|
||||||
|
|
||||||
|
macro (opencs_hdrs dir)
|
||||||
|
foreach (u ${ARGN})
|
||||||
|
add_qt_hdr (OPENCS ${dir} ${u})
|
||||||
|
endforeach (u)
|
||||||
|
endmacro (opencs_hdrs)
|
||||||
|
|
||||||
|
macro (opencs_hdrs_noqt dir)
|
||||||
|
foreach (u ${ARGN})
|
||||||
|
add_hdr (OPENCS ${dir} ${u})
|
||||||
|
endforeach (u)
|
||||||
|
endmacro (opencs_hdrs)
|
||||||
|
|
Loading…
Reference in a new issue