This commit is contained in:
ZtRXR 2024-04-21 23:39:04 +08:00
parent 11dcaf7ca7
commit 5d705dc395

View File

@ -27,18 +27,10 @@ class cmake:
return self return self
def add_library(self,name:str=var(project_name),mode:ModesSSM="STATIC",*source:str)->Self: def add_library(self,name:str=var(project_name),mode:ModesSSM="STATIC",*source:str)->Self:
"""
ARGS:
mode: mode can be STATIC , SHARED or MODULE
"""
self.__write_stack__.append(f"add_library({name} {mode} {args_to_str(source)})") self.__write_stack__.append(f"add_library({name} {mode} {args_to_str(source)})")
return self return self
def target_include_directories(self,for_project:str=var(project_name),mode:ModesPPI="PUBLIC",*directories:str)->Self: def target_include_directories(self,for_project:str=var(project_name),mode:ModesPPI="PUBLIC",*directories:str)->Self:
"""
ARGS:
mode : mode can be PUBLIC PRIVATE INTERFACE
"""
self.__write_stack__.append(f"target_include_directories({for_project} {mode} {args_to_str(directories)})") self.__write_stack__.append(f"target_include_directories({for_project} {mode} {args_to_str(directories)})")
return self return self