From daff1528cbc34a261aa8709ca468e9904e85d349 Mon Sep 17 00:00:00 2001 From: Karl-Wilfried Zimmer Date: Sun, 31 Dec 2023 15:06:43 +0100 Subject: [PATCH] restructuring --- CMakeLists.txt | 12 +++++++----- app/CMakeLists.txt | 5 +++++ main.cpp => app/main.cpp | 0 src/CMakeLists.txt | 6 ++++++ 4 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 app/CMakeLists.txt rename main.cpp => app/main.cpp (100%) create mode 100644 src/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ed554a..2b8d89e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,10 @@ cmake_minimum_required(VERSION 3.10) -project(Geometry) +project(Geometry VERSION 0.1 LANGUAGES CXX) + +if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) +endif () set(CMAKE_CXX_STANDARD 17) @@ -8,8 +12,6 @@ include_directories(${PROJECT_SOURCE_DIR}/include) add_subdirectory(lib/eigen) -add_executable(Geometry main.cpp) +add_subdirectory(src) -target_link_libraries(Geometry PUBLIC Eigen3::Eigen) - -target_include_directories(Geometry PUBLIC "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/lib/eigen/Eigen") +add_subdirectory(app) \ No newline at end of file diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt new file mode 100644 index 0000000..c639e6e --- /dev/null +++ b/app/CMakeLists.txt @@ -0,0 +1,5 @@ +add_executable(Geometry main.cpp) + +target_link_libraries(Geometry PUBLIC Eigen3::Eigen) + +target_include_directories(Geometry PUBLIC "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/lib/eigen/Eigen") diff --git a/main.cpp b/app/main.cpp similarity index 100% rename from main.cpp rename to app/main.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..8009f94 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,6 @@ +set(HEADER_LIST "${Geometry_SOURCE_DIR}/include/Geometry/dummy.h") +source_group( + TREE "${PROJECT_SOURCE_DIR}/include" + PREFIX "Header Files" + FILES ${HEADER_LIST} +) \ No newline at end of file