diff options
| author | Levent Kaya <42411502+lvntky@users.noreply.github.com> | 2024-11-24 21:17:01 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-24 21:17:01 +0300 |
| commit | 766962f9970cc3d8ee5b49c8bc987fe14c9eda7c (patch) | |
| tree | 7a6b8abc927b0ef832d677fd80aa255ca7dd0951 /example/CMakeLists.txt | |
| parent | 0898b3d26129f3880223d0d457fe05fd3f6be180 (diff) | |
| parent | f795c9d0bc73dca2cabb36c1889dc99422549def (diff) | |
Merge pull request #6 from dario-loi/master
[FIX] Move all implementation under include guard
Diffstat (limited to 'example/CMakeLists.txt')
| -rw-r--r-- | example/CMakeLists.txt | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 411945a..e7bf93e 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -2,23 +2,36 @@ cmake_minimum_required(VERSION 3.21) project(fbglExamples C) -include(../cmake/folders.cmake) +include(../ cmake / folders.cmake) if(PROJECT_IS_TOP_LEVEL) - find_package(fbgl REQUIRED) + find_package( + fbgl REQUIRED) endif() -add_custom_target(run-examples) +add_custom_target(run - examples) function(add_example NAME) - add_executable("${NAME}" "${NAME}.c") - target_link_libraries("${NAME}" PRIVATE fbgl::fbgl) - target_compile_features("${NAME}" PRIVATE c_std_99) - add_custom_target("run_${NAME}" COMMAND "${NAME}" VERBATIM) - add_dependencies("run_${NAME}" "${NAME}") - add_dependencies(run-examples "run_${NAME}") + add_executable( + "${NAME}" + "${NAME}.c") + target_link_libraries("${NAME}" PRIVATE + fbgl::fbgl) + target_compile_features("${NAME}" PRIVATE c_std_99) + add_custom_target( + "run_${NAME}" COMMAND + "${NAME}" VERBATIM) + add_dependencies( + "run_${NAME}" + "${NAME}") + add_dependencies( + run - + examples + "run_${NAME}") endfunction() -add_example(empty_example) +add_example( + empty_example) -add_folders(Example) +add_folders( + Example) |
