diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e2baef..7f97d30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,15 +6,29 @@ project("snake.s" LANGUAGES ASM ) +option(SNAKE_BUILD_TESTS "Build the snake.s tests" ON) + add_subdirectory("libs") -add_executable("snake.s" +add_library("snake.core" "src/error.S" - "src/main.S" + "src/snake.S" +) + +target_include_directories("snake.core" PUBLIC + "src" ) -target_link_libraries("snake.s" PRIVATE +target_link_libraries("snake.core" PUBLIC "bindings::SDL2" ) +add_executable("snake.s" "src/main.S") + +target_link_libraries("snake.s" PRIVATE "snake.core") + install(TARGETS "snake.s") + +if(SNAKE_BUILD_TESTS) + add_subdirectory("tests") +endif()
\ No newline at end of file |
