aboutsummaryrefslogtreecommitdiff
path: root/works/life/cpp-practicum/CMakeLists.txt
blob: 346fdb42d9b6f566f66281ac7d8fe64634cc3ef9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
cmake_minimum_required(VERSION 3.14)

set(CMAKE_TOOLCHAIN_FILE $ENV{VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake
  CACHE STRING "Vcpkg toolchain file")

project(CppPraticum)

enable_testing()

set(CMAKE_CXX_STANDARD 17)

if (MSVC)
	string(REGEX REPLACE "/W[0-4]\\s*" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
	add_compile_options(/utf-8 /W4 /WX)
endif()

find_package(Qt5Core CONFIG REQUIRED)
find_package(Qt5Gui CONFIG REQUIRED)
find_package(Qt5Widgets CONFIG REQUIRED)

add_executable(main
	Base.hpp

	Book.hpp
	Book.cpp
	Vendor.hpp
	Vendor.cpp
	Record.hpp
	Record.cpp

	main.cpp
)
target_link_libraries(main PRIVATE Qt5::Core Qt5::Widgets Qt5::Gui)