I hate my life
This commit is contained in:
@ -7,13 +7,10 @@ cmake_minimum_required(VERSION 3.13)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
SET(TOOL_NAME texture_generation)
|
||||
set(TOOL_TEXTURE_GENERATION_SOURCE_DIR)
|
||||
|
||||
# Build Tool
|
||||
project(${TOOL_NAME} VERSION 1.0)
|
||||
add_executable(${TOOL_NAME})
|
||||
target_sources(${TOOL_NAME}
|
||||
project(texture_generation VERSION 1.0)
|
||||
add_executable(texture_generation)
|
||||
target_sources(texture_generation
|
||||
PRIVATE
|
||||
texture_generation.c
|
||||
../utils/file.c
|
||||
@ -22,7 +19,7 @@ target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}/../
|
||||
)
|
||||
target_link_libraries(${TOOL_NAME}
|
||||
target_link_libraries(texture_generation
|
||||
PUBLIC
|
||||
stb
|
||||
)
|
||||
@ -30,8 +27,8 @@ target_link_libraries(${TOOL_NAME}
|
||||
# Function for creating the target
|
||||
function(tool_texture target in out)
|
||||
add_custom_target(${target}
|
||||
COMMAND texture_generation "${ROOT_DIR}/${ASSETS_DIR}/${in}" "${ASSETS_DIR}/${out}"
|
||||
COMMAND texture_generation "${in}" "${ASSETS_BUILD_DIR}/${out}"
|
||||
COMMENT "Generating texture ${target} from ${in}"
|
||||
SOURCES ${TOOL_NAME}
|
||||
DEPENDS texture_generation ${ARGN}
|
||||
)
|
||||
endfunction()
|
Reference in New Issue
Block a user