zombie-lib/CMakeLists.txt

24 lines
587 B
CMake
Raw Normal View History

2021-09-26 17:30:13 -04:00
cmake_minimum_required(VERSION 3.14)
2021-10-02 13:33:15 -04:00
project (zlib)
2021-09-26 17:30:13 -04:00
#set(CMAKE_ASM_NASM_LINK_EXECUTABLE ld)
#Set C++ language version
set(CMAKE_CXX_STANDARD 17)
#Enable ASM provided by NASM
enable_language(ASM_NASM)
set(CMAKE_ASM_NASM_LINK_EXECUTABLE "gcc <CMAKE_ASM_NASM_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
#add symbols
add_compile_options(-g)
add_link_options(-fno-pie -m64 -no-pie -pedantic-errors)
#Make a EXE with cpp and asm files
2021-10-02 21:37:52 -04:00
add_library(z tolower.asm strlen.asm strcmp.asm atoi.asm)
2021-09-26 17:30:13 -04:00
add_executable(example example.asm)
target_link_libraries(example z)