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

16 lines
446 B
CMake
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

cmake_minimum_required(VERSION 3.10)
# 指定C++版本
set(CMAKE_CXX_STANDARD 11)
project(AbstractFatory)
set(SRC_LIST main.cpp)
add_executable(app3 ${SRC_LIST})
# 指定可执行文件的输出路径相对路径是相对makefile文件位置的路径
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})