DesignPattern/03.AbstractFactory/2.Code/CMakeLists.txt

16 lines
446 B
CMake
Raw Normal View History

2023-08-06 03:08:28 +00:00
cmake_minimum_required(VERSION 3.10)
2023-08-06 03:21:28 +00:00
# 指定C++版本
2023-08-06 03:08:28 +00:00
set(CMAKE_CXX_STANDARD 11)
project(AbstractFatory)
set(SRC_LIST main.cpp)
2023-08-08 14:10:55 +00:00
add_executable(app3 ${SRC_LIST})
2023-08-06 03:21:28 +00:00
# 指定可执行文件的输出路径相对路径是相对makefile文件位置的路径
2023-08-08 14:10:55 +00:00
get_filename_component(FOLDER_NAME ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
get_filename_component(FOLDER_NAME ${FOLDER_NAME} NAME)
set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}/${FOLDER_NAME})