54 lines
1009 B
CMake
54 lines
1009 B
CMake
include(cmake/generated.cmake)
|
|
|
|
file(GLOB_RECURSE ARTI_LIB_SOURCES "src/**.cpp")
|
|
file(GLOB_RECURSE ARTI_LIB_HEADERS "include/**.hpp")
|
|
file(GLOB_RECURSE ARTI_LIB_GEN_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/include/**.hpp")
|
|
|
|
add_library(
|
|
library SHARED
|
|
${ARTI_LIB_SOURCES}
|
|
)
|
|
|
|
set_target_properties(
|
|
library PROPERTIES
|
|
OUTPUT_NAME "artichoke"
|
|
)
|
|
|
|
target_compile_options(
|
|
library PRIVATE
|
|
-pedantic
|
|
-Wall
|
|
-Wextra
|
|
-Wold-style-cast
|
|
-Wsign-conversion
|
|
-Wsign-promo
|
|
-Wstrict-null-sentinel
|
|
-Wstrict-overflow=5
|
|
-Wswitch-default
|
|
-Wundef
|
|
-Werror
|
|
-Wno-unused
|
|
)
|
|
|
|
target_sources(
|
|
library PUBLIC
|
|
FILE_SET HEADERS
|
|
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
FILES
|
|
${ARTI_LIB_HEADERS}
|
|
)
|
|
|
|
target_sources(
|
|
library PUBLIC
|
|
FILE_SET HEADERS
|
|
BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/include
|
|
FILES
|
|
${ARTI_LIB_GEN_HEADERS}
|
|
)
|
|
|
|
target_include_directories(
|
|
library PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
$<INSTALL_INTERFACE:>
|
|
)
|