added windows input port and added defines for windows and linux systems

This commit is contained in:
2025-01-31 13:11:21 -08:00
parent 69ce396f38
commit 6935d05349
4 changed files with 61 additions and 21 deletions

View File

@@ -3,6 +3,7 @@ set( CMAKE_STATIC_LIBRARY_PREFIX "")
set( CMAKE_C_STANDARD 11)
set( CMAKE_C_STANDARD_REQUIRED ON)
set(LIB_SOURCES
term.c
term.h
@@ -10,4 +11,13 @@ set(LIB_SOURCES
)
add_library(${PROJECT_NAME} STATIC ${LIB_SOURCES})
target_include_directories(${PROJECT_NAME} BEFORE PUBLIC "../includes/")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_compile_definitions(${PROJECT_NAME} PUBLIC "_LINUX")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_compile_definitions(${PROJECT_NAME} PUBLIC "_WIN32")
target_compile_definitions(${PROJECT_NAME} PUBLIC "_WIN64")
endif()