cmake_minimum_required(VERSION 3.16) project(rrcSmall) set(CMAKE_CXX_STANDARD 14) if (NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") endif() set(SOURCE_FILES src/ImageFormat.cpp src/ImageFormat.h src/SmallFirmwareFormat.cpp src/SmallFirmwareFormat.h src/instructions/AddressOffset.h src/instructions/Instruction.cpp src/instructions/Instruction.h src/instructions/Write.cpp src/instructions/Write.h src/instructions/Copy.cpp src/instructions/Copy.h src/instructions/Load.cpp src/instructions/Load.h src/instructions/Init.cpp src/instructions/Init.h src/instructions/Calc.cpp src/instructions/Calc.h src/instructions/CalcImm.cpp src/instructions/CalcImm.h src/instructions/Branch.cpp src/instructions/Branch.h src/instructions/Poll.cpp src/instructions/Poll.h src/instructions/Loop.cpp src/instructions/Loop.h src/instructions/Jump.cpp src/instructions/Jump.h src/instructions/Return.cpp src/instructions/Return.h src/instructions/Set.cpp src/instructions/Set.h src/instructions/Wait.cpp src/instructions/Wait.h src/instructions/End.cpp src/instructions/End.h src/Registers.cpp src/Registers.h src/AnalysisState.cpp src/AnalysisState.h src/Configuration.cpp src/Configuration.h src/OutputContext.cpp src/OutputContext.h ) add_library(rrcimage STATIC ${SOURCE_FILES}) add_executable(rrcSmall src/main.cpp) target_link_libraries(rrcSmall rrcimage)