2023-03-01 10:48:50 +08:00
|
|
|
cmake_minimum_required(VERSION 3.12)
|
|
|
|
project(Unvirt LANGUAGES CXX)
|
|
|
|
|
2023-09-25 21:45:53 +08:00
|
|
|
# add libcmo if not existed
|
|
|
|
if (NOT TARGET LibCmo)
|
|
|
|
add_subdirectory("../LibCmo" "LibCmo.out")
|
|
|
|
endif ()
|
|
|
|
# add ironpad if not existed
|
|
|
|
if (NOT TARGET IronPad)
|
|
|
|
add_subdirectory("../IronPad" "IronPad.out")
|
|
|
|
endif ()
|
2023-03-01 10:48:50 +08:00
|
|
|
|
|
|
|
# setup sources
|
2023-09-25 21:45:53 +08:00
|
|
|
set(unvirt_headers ".")
|
2023-03-01 10:48:50 +08:00
|
|
|
set(unvirt_sources
|
|
|
|
AccessibleValue.cpp
|
|
|
|
CmdHelper.cpp
|
|
|
|
StringHelper.cpp
|
|
|
|
StructFormatter.cpp
|
|
|
|
TerminalHelper.cpp
|
2023-08-31 10:20:10 +08:00
|
|
|
UnvirtContext.cpp
|
2023-03-01 10:48:50 +08:00
|
|
|
Unvirt.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
# generate program
|
|
|
|
add_executable(Unvirt ${unvirt_sources})
|
|
|
|
target_link_libraries(Unvirt
|
|
|
|
PRIVATE
|
|
|
|
LibCmo
|
2023-09-24 23:27:20 +08:00
|
|
|
IronPad
|
2023-03-01 10:48:50 +08:00
|
|
|
)
|
2023-09-25 21:45:53 +08:00
|
|
|
target_include_directories(Unvirt
|
|
|
|
PRIVATE
|
|
|
|
${unvirt_headers}
|
|
|
|
)
|
|
|
|
|
|
|
|
# set project standard
|
|
|
|
set_target_properties(Unvirt
|
|
|
|
PROPERTIES
|
|
|
|
CXX_STANDARD 20
|
|
|
|
CXX_STANDARD_REQUIRED 20
|
|
|
|
CXX_EXTENSION OFF
|
|
|
|
)
|
|
|
|
|
2023-03-01 10:48:50 +08:00
|
|
|
|