Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Tectu committed Nov 10, 2023
1 parent 16b48be commit b091503
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 647 deletions.
20 changes: 8 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ project(
)

# User options
option(CPPPROPERTIES_BUILD_EXAMPLES "Whether to build examples." ON)
option(CPPPROPERTIES_BUILD_TESTS "Whether to build tests." ON)
option(CPPPROPERTIES_ENABLE_BOOST "Whether to enable built-in support for common boost types." OFF)
option(CPPPROPERTIES_ENABLE_QT "Whether to enable built-in support for Qt types." OFF)
option(CPPPROPERTIES_ENABLE_QT_WIDGETS "Whether to enable built-in support for Qt widgets." OFF)
option(CPPPROPERTIES_ENABLE_JSON "Whether to enable JSON (de)serialization." ON)
option(CPPPROPERTIES_ENABLE_XML "Whether to enable XML (de)serialization." ON)
option(CPPPROPERTIES_ENABLE_GPDS "Whether to enable GPDS (de)serialization." OFF)
option(CPPPROPERTIES_PERFORM_CPPCHECK "Whether to run cppcheck." OFF)
option(CPPPROPERTIES_BUILD_EXAMPLES "Whether to build examples." ON)
option(CPPPROPERTIES_BUILD_TESTS "Whether to build tests." ON)
option(CPPPROPERTIES_ENABLE_BOOST "Whether to enable built-in support for common boost types." OFF)
option(CPPPROPERTIES_ENABLE_QT "Whether to enable built-in support for Qt types." OFF)
option(CPPPROPERTIES_ENABLE_QT_WIDGETS "Whether to enable built-in support for Qt widgets." OFF)
option(CPPPROPERTIES_ENABLE_SERIALIZATION "Whether to enable (de)serialization." OFF)
option(CPPPROPERTIES_PERFORM_CPPCHECK "Whether to run cppcheck." OFF)

# Include examples (if supposed to)
if (CPPPROPERTIES_BUILD_EXAMPLES)
Expand Down Expand Up @@ -59,9 +57,7 @@ message(STATUS " Boost : " ${CPPPROPERTIES_ENABLE_BOOST})
message(STATUS " Qt : " ${CPPPROPERTIES_ENABLE_QT})
message(STATUS "")
message(STATUS "Serialization:")
message(STATUS " JSON : " ${CPPPROPERTIES_ENABLE_JSON})
message(STATUS " XML : " ${CPPPROPERTIES_ENABLE_XML})
message(STATUS " GPDS : " ${CPPPROPERTIES_ENABLE_GPDS})
message(STATUS " GPDS : " ${CPPPROPERTIES_ENABLE_SERIALIZATION})
message(STATUS "")
message(STATUS "GUI Elements:")
message(STATUS " Qt : " ${CPPPROPERTIES_ENABLE_QT_WIDGETS})
Expand Down
13 changes: 3 additions & 10 deletions cppproperties/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ set(TARGET cppproperties)

# List of public headers
set(HEADERS_PUBLIC
archiver.hpp
$<$<BOOL:${CPPPROPERTIES_ENABLE_JSON}>:${CMAKE_CURRENT_LIST_DIR}/archiver_json.hpp>
$<$<BOOL:${CPPPROPERTIES_ENABLE_XML}>:${CMAKE_CURRENT_LIST_DIR}/archiver_xml.hpp>
$<$<BOOL:${CPPPROPERTIES_ENABLE_GPDS}>:${CMAKE_CURRENT_LIST_DIR}/archiver_gpds.hpp>
exceptions.hpp
properties.hpp
property.hpp
Expand All @@ -18,6 +14,7 @@ set(HEADERS_PUBLIC
property_ex_cpp_modern.hpp
$<$<BOOL:${CPPPROPERTIES_ENABLE_BOOST}>:${CMAKE_CURRENT_LIST_DIR}/property_ex_boost.hpp>
$<$<BOOL:${CPPPROPERTIES_ENABLE_QT}>:${CMAKE_CURRENT_LIST_DIR}/property_ex_qt.hpp>
$<$<BOOL:${CPPPROPERTIES_ENABLE_SERIALIZATION}>:${CMAKE_CURRENT_LIST_DIR}/serialization.hpp>
)

set(HEADERS_QT_WIDGETS_PUBLIC
Expand All @@ -41,9 +38,7 @@ target_compile_definitions(
$<$<BOOL:${CPPPROPERTIES_ENABLE_BOOST}>:CPPPROPERTIES_ENABLE_BOOST>
$<$<BOOL:${CPPPROPERTIES_ENABLE_QT}>:CPPPROPERTIES_ENABLE_QT>
$<$<BOOL:${CPPPROPERTIES_ENABLE_QT_WIDGETS}>:CPPPROPERTIES_ENABLE_QT_WIDGETS>
$<$<BOOL:${CPPPROPERTIES_ENABLE_JSON}>:CPPPROPERTIES_ENABLE_JSON>
$<$<BOOL:${CPPPROPERTIES_ENABLE_XML}>:CPPPROPERTIES_ENABLE_XML>
$<$<BOOL:${CPPPROPERTIES_ENABLE_GPDS}>:CPPPROPERTIES_ENABLE_GPDS>
$<$<BOOL:${CPPPROPERTIES_ENABLE_SERIALIZATION}>:CPPPROPERTIES_ENABLE_SERIALIZATION>
)

target_sources(
Expand All @@ -58,9 +53,7 @@ target_link_libraries(
INTERFACE
$<$<BOOL:${CPPPROPERTIES_ENABLE_BOOST}>:Boost::headers>
$<$<BOOL:${CPPPROPERTIES_ENABLE_QT}>:Qt::Core>
$<$<BOOL:${CPPPROPERTIES_ENABLE_GPDS}>:gpds::gpds-shared>
$<$<BOOL:${CPPPROPERTIES_ENABLE_JSON}>:nlohmann_json::nlohmann_json>
$<$<BOOL:${CPPPROPERTIES_ENABLE_XML}>:tinyxml2::tinyxml2>
$<$<BOOL:${CPPPROPERTIES_ENABLE_SERIALIZATION}>:gpds::gpds-shared>
$<$<BOOL:${CPPPROPERTIES_ENABLE_QT_WIDGETS}>:Qt::Gui>
$<$<BOOL:${CPPPROPERTIES_ENABLE_QT_WIDGETS}>:Qt::Widgets>
)
Expand Down
99 changes: 0 additions & 99 deletions cppproperties/archiver.hpp

This file was deleted.

68 changes: 0 additions & 68 deletions cppproperties/archiver_json.hpp

This file was deleted.

Loading

0 comments on commit b091503

Please sign in to comment.