diff --git a/.gitignore b/.gitignore index 4b310ac..57ea3ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ build/* build -lib/lvgl/* -lib/lv_drivers/* -lib/testlib .gitignore \ No newline at end of file +lib/* +!lib/testlib .gitignore \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 47d683b..a1e2666 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,9 @@ add_compile_definitions(DLV_CONF_PATH="${CMAKE_CURRENT_SOURCE_DIR}/include/lv_co add_compile_definitions(DLV_CONF_PATH="${CMAKE_CURRENT_SOURCE_DIR}/include/lv_drv_conf.h") include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib/sdl-cmake) + + # set 1 to compile static (Standalone) set(BIN_STATIC 1) @@ -40,7 +43,6 @@ endif() set(SubProjects testlib # Example subproject lvgl - lv_drivers ) # Create the main executable, specifying the source file @@ -62,9 +64,9 @@ foreach(Project IN LISTS SubProjects) # Link the subproject to the main project executable if(BIN_STATIC) - target_link_libraries(${PROJECT_NAME} PRIVATE ${Project} -static) + target_link_libraries(${PROJECT_NAME} PUBLIC ${Project} -static) else() - target_link_libraries(${PROJECT_NAME} PRIVATE ${Project}) + target_link_libraries(${PROJECT_NAME} PUBLIC ${Project}) endif() endforeach() diff --git a/README.md b/README.md index bc8bbc7..e391673 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,5 @@ This project is designed to learn how to structure a C project with CMake and in ./clean.sh +- TODO https://gitlab.com/aminosbh/sdl2-cmake-modules +