Write some code

FossilOrigin-Name: c84a11a61611ca961d9cb06707556e466d489b5ead938410ba7fb5387f83f5a3
This commit is contained in:
nekobit 2022-12-08 19:43:38 +00:00
parent 631265909e
commit b25d6a9df0
2 changed files with 4 additions and 8 deletions

View File

@ -15,11 +15,9 @@ project(treebird
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/mastodont-c")
include(mastodont-c/cmake/mastodont-config.cmake)
else()
#
find_package(MASTODONT REQUIRED)
endif()
add_executable(treebird ${SRC_FILES})
# Useful
@ -58,8 +56,6 @@ target_compile_options(treebird PUBLIC
$<$<CONFIG:RELEASE>:-O2>
)
# hack is on me
target_link_options(treebird PUBLIC
-lmastodont
@ -114,7 +110,6 @@ append_and_def(treebird PUBLIC SRC_FILES
src/status.c
src/timeline.c
)
message("${COMPILE_DEFINITIONS}")
target_sources(treebird PUBLIC ${SRC_FILES})

View File

@ -7,9 +7,10 @@ function(append_and_def TARGET SCOPE NAME ...)
set(Y)
foreach(I RANGE 3 ${ARGC})
# Convert to uppercase for the definition
list(GET ARGV ${I} X)
get_filename_component(TEMP ${X} NAME_WE)
string(TOUPPER _TEMP ${TEMP})
list(GET ARGV ${I} I)
math(EXPR I "${I} - 1")
get_filename_component(I ${X} NAME_WE)
string(TOUPPER _TEMP ${I})
# get_target_property(
# targ_comp