85 lines
1.9 KiB
CMake
85 lines
1.9 KiB
CMake
###########################################################################################
|
|
#
|
|
# (c) Technical Software Engineering Plazotta 2021
|
|
#
|
|
# CMAKE project file / @Add your project name@
|
|
#
|
|
#
|
|
#-----------------------------------------------------------------------------------------
|
|
# Define project specific requirements
|
|
#
|
|
# Project name, output file name, project description
|
|
#
|
|
set(PROJECT_NAME @Add your project name@)
|
|
set(PROJECT_OUTPUT_NAME @Add your project lib name@)
|
|
set(PROJECT_DESCRIPTION "@Add your project description@")
|
|
#
|
|
#-----------------------------------------------------------------------------------------
|
|
# Define group file names
|
|
#
|
|
# SOURCE FILES
|
|
#
|
|
set(SOURCE_FILES
|
|
src/...
|
|
)
|
|
#
|
|
# HEADER FILES
|
|
#
|
|
set(HEADER_FILES
|
|
src/...
|
|
)
|
|
#
|
|
#-----------------------------------------------------------------------------------------
|
|
# Define solution folders for group files
|
|
#
|
|
source_group("Source Files" FILES ${SOURCE_FILES})
|
|
source_group("Header Files" FILES ${HEADER_FILES})
|
|
#
|
|
# Create static library target
|
|
#
|
|
add_library(${PROJECT_NAME} STATIC
|
|
${SOURCE_FILES}
|
|
${HEADER_FILES}
|
|
)
|
|
#
|
|
# Add alias for the project
|
|
#
|
|
add_library(Tsep::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
|
|
#
|
|
# Setup TSEP OS specific settings for the project
|
|
#
|
|
TSEP_ADD_OS_SPECIFIC_SETTINGS()
|
|
#
|
|
# Setup output name
|
|
#
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_OUTPUT_NAME})
|
|
#
|
|
# Use VS Code Analysis for the project
|
|
#
|
|
TSEP_USE_CODE_ANALYSIS(${PROJECT_NAME})
|
|
#
|
|
# Define Export Headers
|
|
#
|
|
TSEP_ADD_EXPORT_HEADER("${HEADER_FILES}")
|
|
#
|
|
# Include files, add your own includes and for the export
|
|
#
|
|
target_include_directories(${PROJECT_NAME}
|
|
PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src>
|
|
$<INSTALL_INTERFACE:inc>
|
|
#PRIVATE
|
|
# include paths, which will not be exported
|
|
)
|
|
#
|
|
# Add used libs
|
|
#
|
|
#target_link_libraries(${PROJECT_NAME}
|
|
# PUBLIC
|
|
# /- Add your additional libraries -/
|
|
#)
|
|
#
|
|
# Create an Export directory with the defined data
|
|
#
|
|
TSEP_CREATE_EXPORT(static)
|
|
#
|