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