From 80e7506e3429677238b11e6a0ad3e31bd1e9ed0d Mon Sep 17 00:00:00 2001 From: deniskovalchuk Date: Wed, 13 Sep 2023 00:45:36 +0300 Subject: [PATCH] Set project layout for IDEs --- apps/cmdline/src/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/cmdline/src/CMakeLists.txt b/apps/cmdline/src/CMakeLists.txt index d908f80..7340484 100644 --- a/apps/cmdline/src/CMakeLists.txt +++ b/apps/cmdline/src/CMakeLists.txt @@ -1,4 +1,4 @@ -add_executable(${PROJECT_NAME} +set(sources cmdline_exception.hpp cmdline_interface.cpp cmdline_interface.hpp @@ -13,6 +13,12 @@ add_executable(${PROJECT_NAME} utils.cpp utils.hpp) +# Set project layout for IDEs. +get_filename_component(parent_dir "${CMAKE_CURRENT_SOURCE_DIR}" DIRECTORY) +source_group(TREE "${parent_dir}" FILES ${sources}) + +add_executable(${PROJECT_NAME} ${sources}) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) target_link_libraries(${PROJECT_NAME} PRIVATE ftp Boost::boost)