mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 12:02:47 -05:00
COMP: Reorganize cmake files
This commit is contained in:
@@ -3,18 +3,12 @@ project(toddcox-faster)
|
|||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
include(vendor/eigen.cmake)
|
file(GLOB externals ext/*.cmake)
|
||||||
include(vendor/entt.cmake)
|
foreach (external ${externals})
|
||||||
include(vendor/fmt.cmake)
|
include(${external})
|
||||||
include(vendor/glad.cmake)
|
endforeach ()
|
||||||
include(vendor/glfw.cmake)
|
|
||||||
include(vendor/gtest.cmake)
|
|
||||||
include(vendor/peglib.cmake)
|
|
||||||
include(vendor/yaml-cpp.cmake)
|
|
||||||
|
|
||||||
include(vendor/embed.cmake)
|
include(cmake/embed.cmake)
|
||||||
|
|
||||||
add_subdirectory(tc)
|
add_subdirectory(tc)
|
||||||
add_subdirectory(vis)
|
add_subdirectory(vis)
|
||||||
|
|
||||||
add_subdirectory(examples)
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ function(_embed_file OUTPUT_OBJECT FILE)
|
|||||||
COMMENT "Embedding ${FILE} in ${OBJECT}"
|
COMMENT "Embedding ${FILE} in ${OBJECT}"
|
||||||
OUTPUT "${FILE}.o" DEPENDS "${FILE}"
|
OUTPUT "${FILE}.o" DEPENDS "${FILE}"
|
||||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
COMMAND ${EMBED_LD} -r -o "${OBJECT}" --format=binary "${FILE}"
|
COMMAND ${EMBED_LD} -r -o "${OBJECT}" --format=binary "${FILE}"
|
||||||
COMMAND ${EMBED_OBJCOPY} --rename-section .data=.rodata,alloc,load,readonly,data,contents "${OBJECT}"
|
COMMAND ${EMBED_OBJCOPY} --rename-section .data=.rodata,alloc,load,readonly,data,contents "${OBJECT}"
|
||||||
VERBATIM
|
VERBATIM
|
||||||
@@ -1 +0,0 @@
|
|||||||
# there's no examples right now.
|
|
||||||
@@ -8,7 +8,7 @@ add_library(tc
|
|||||||
src/lang.cpp
|
src/lang.cpp
|
||||||
src/solve.cpp
|
src/solve.cpp
|
||||||
)
|
)
|
||||||
target_link_libraries(tc peglib::peglib fmt::fmt)
|
target_link_libraries(tc peglib fmt)
|
||||||
target_include_directories(tc PUBLIC include)
|
target_include_directories(tc PUBLIC include)
|
||||||
|
|
||||||
add_library(tc::tc ALIAS tc)
|
add_library(tc::tc ALIAS tc)
|
||||||
|
|||||||
12
vendor/toddcox.cmake
vendored
12
vendor/toddcox.cmake
vendored
@@ -1,12 +0,0 @@
|
|||||||
include(FetchContent)
|
|
||||||
|
|
||||||
FetchContent_Declare(
|
|
||||||
toddcox
|
|
||||||
GIT_REPOSITORY https://github.com/jcraymond/toddcox-faster.git
|
|
||||||
GIT_TAG 265de59917bdf94709b40ad8aef5dd9ce5574242
|
|
||||||
GIT_PROGRESS TRUE
|
|
||||||
)
|
|
||||||
|
|
||||||
set(TC_BUILD_EXAMPLE OFF CACHE INTERNAL "")
|
|
||||||
|
|
||||||
FetchContent_MakeAvailable(toddcox)
|
|
||||||
@@ -1,10 +1,3 @@
|
|||||||
#add_custom_target(shaders ALL DEPENDS shader_output)
|
|
||||||
#add_custom_command(
|
|
||||||
# OUTPUT shader_output
|
|
||||||
# COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/shaders ${CMAKE_CURRENT_BINARY_DIR}/shaders
|
|
||||||
# COMMENT "copied shaders"
|
|
||||||
#)
|
|
||||||
|
|
||||||
add_subdirectory(shaders)
|
add_subdirectory(shaders)
|
||||||
|
|
||||||
add_custom_target(presets ALL DEPENDS preset_output)
|
add_custom_target(presets ALL DEPENDS preset_output)
|
||||||
@@ -14,22 +7,13 @@ add_custom_command(
|
|||||||
COMMENT "copied preses"
|
COMMENT "copied preses"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(vis-util INTERFACE)
|
|
||||||
target_include_directories(vis-util INTERFACE include)
|
|
||||||
|
|
||||||
add_executable(vis
|
add_executable(vis
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
src/comps.hpp
|
src/comps.hpp
|
||||||
)
|
)
|
||||||
target_include_directories(vis PRIVATE include)
|
target_include_directories(vis PRIVATE include)
|
||||||
target_link_libraries(vis PRIVATE
|
target_link_libraries(vis PRIVATE
|
||||||
tc
|
tc shaders
|
||||||
glad
|
glad eigen glfw yaml-cpp fmt EnTT
|
||||||
eigen
|
|
||||||
glfw
|
|
||||||
yaml-cpp
|
|
||||||
shaders
|
|
||||||
fmt::fmt
|
|
||||||
EnTT::EnTT
|
|
||||||
)
|
)
|
||||||
add_dependencies(vis presets)
|
add_dependencies(vis presets)
|
||||||
|
|||||||
Reference in New Issue
Block a user