CHORE: Fixed bug #4 by looping dirs and creating directories before
other loops in creation. LANG: Added CPP and bugfixed c to use c code and not python
This commit is contained in:
@@ -59,21 +59,26 @@ set(CMAKE_C_STANDARD 23)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
add_library(__PROJECT_NAME__ STATIC
|
||||
set(LIB_SOURCES
|
||||
# Add your other types here as you implement them:
|
||||
# src/example1.c
|
||||
# src/example2.c
|
||||
)
|
||||
|
||||
target_include_directories(__PROJECT_NAME__
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
)
|
||||
if(LIB_SOURCES)
|
||||
add_library(__PROJECT_NAME__ STATIC ${LIB_SOURCES})
|
||||
target_include_directories(%s
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
)
|
||||
endif()
|
||||
|
||||
add_executable(__PROJECT_NAME___bin src/main.c)
|
||||
set_target_properties(__PROJECT_NAME___bin PROPERTIES OUTPUT_NAME "__PROJECT_NAME__")
|
||||
|
||||
target_link_libraries(__PROJECT_NAME___bin PRIVATE __PROJECT_NAME__)
|
||||
if(TARGET __PROJECT_NAME__)
|
||||
target_link_libraries(__PROJECT_NAME___bin PRIVATE __PROJECT_NAME__)
|
||||
endif()
|
||||
]=]) .. "\n",
|
||||
|
||||
--[[ =====================================================================
|
||||
|
||||
Reference in New Issue
Block a user