diff --git a/CMakeLists.txt b/CMakeLists.txt index e2e1b97..59c1c73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,21 +5,14 @@ project( VERSION 0.1.0 LANGUAGES CXX) -add_subdirectory(lib_vector_search) - list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") include(ExportCompileCommands) include(sccache) -add_executable(VectorSearch main.cpp) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) -target_link_libraries(VectorSearch lib_vector_search) - -target_compile_features(VectorSearch PUBLIC cxx_std_20) - -set_target_properties( - VectorSearch - PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin" - RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin" - RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin") +add_subdirectory(lib_vector_search) +add_subdirectory(vector_search_cli) diff --git a/vector_search_cli/CMakeLists.txt b/vector_search_cli/CMakeLists.txt new file mode 100644 index 0000000..c29073f --- /dev/null +++ b/vector_search_cli/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.20) + +project( + vector_search_cli + VERSION 0.1.0 + LANGUAGES CXX) + +add_executable(vector_search_cli main.cpp) + +target_link_libraries(vector_search_cli lib_vector_search) + +target_compile_features(vector_search_cli PRIVATE cxx_std_20) diff --git a/main.cpp b/vector_search_cli/main.cpp similarity index 100% rename from main.cpp rename to vector_search_cli/main.cpp