diff --git a/CMakeLists.txt b/CMakeLists.txt index f4f2db2..f283039 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 $<$:-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}) diff --git a/cmake/append_and_def.cmake b/cmake/append_and_def.cmake index b062906..d2603d9 100644 --- a/cmake/append_and_def.cmake +++ b/cmake/append_and_def.cmake @@ -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