Did some tweaks to the CMakeLists

This commit is contained in:
2021-10-16 22:57:19 -07:00
parent d8ded38fd5
commit f7165daa6d
19 changed files with 178 additions and 243 deletions

View File

@ -1,6 +1,28 @@
file(GLOB_RECURSE SRCS ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
# Copyright (c) 2021 Dominic Msters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
add_executable(tests ${SRCS})
target_link_libraries(tests game unity)
# Definitions
add_test(tests tests)
# Libraries
target_link_libraries(${PROJECT_NAME}
PUBLIC
unity
)
# Sources
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
target_sources(${PROJECT_NAME}
PRIVATE
${SOURCES}
${HEADERS}
)
# Includes
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_LIST_DIR}
)