generated from Projetos/RaspberryPi_app
First version with generated code
This commit is contained in:
@@ -38,13 +38,29 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS ON) # This enables GNU extensions (gnu++23 instead of c++23)
|
||||
|
||||
# Add compile options
|
||||
add_compile_options(-Wall -Wextra -pedantic)
|
||||
add_compile_options(-fno-exceptions -fno-rtti -Wall -Wextra -Wpedantic)
|
||||
|
||||
# Build with debug symbols by default
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
endif()
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Graphics library (platform-independent core)
|
||||
# --------------------------------------------------------------------------
|
||||
add_library(gfx_core STATIC
|
||||
gfx_canvas.cpp
|
||||
)
|
||||
target_include_directories(gfx_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Linux framebuffer HAL
|
||||
# --------------------------------------------------------------------------
|
||||
add_library(gfx_linux_fb STATIC
|
||||
linux_fb_display.cpp
|
||||
)
|
||||
target_link_libraries(gfx_linux_fb PUBLIC gfx_core)
|
||||
|
||||
# Use project name for executable
|
||||
add_executable(${PROJECT_NAME}
|
||||
main.cpp
|
||||
@@ -57,8 +73,7 @@ add_executable(${PROJECT_NAME}
|
||||
# another_file.cpp
|
||||
# )
|
||||
|
||||
# If you need to link libraries (example: pthread)
|
||||
# target_link_libraries(${PROJECT_NAME} PRIVATE pthread)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE gfx_linux_fb)
|
||||
|
||||
# Install rule (optional)
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||
Reference in New Issue
Block a user