未验证 提交 e1381748 编写于 作者: M Mark VanderVoord 提交者: GitHub

Merge pull request #446 from michaelbadcrumble/update_cmake_support

Update CMake support.
......@@ -8,34 +8,15 @@
# License: MIT #
# #
###################################################################################
cmake_minimum_required(VERSION 3.13.2.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3 FATAL_ERROR)
#
# CMake: Declare project
#
project(unity LANGUAGES C DESCRIPTION "C Unit testing framework.")
#
# CMake: Creation of library
#
add_library("unity" STATIC)
#
# CMake: Adding source to target
#
target_sources("unity" PRIVATE "src/unity.c")
add_subdirectory("src")
#
# CMake: Including directories to target
#
target_include_directories("unity"
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>"
......@@ -44,18 +25,8 @@ target_include_directories("unity"
PRIVATE "src"
)
#
# CMake: Give target an alias
#
add_library("unity::framework" ALIAS "unity")
#
# CMake: export project
#
install(TARGETS "unity" EXPORT "unityConfig"
ARCHIVE DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_LIBDIR}"
......
###################################################################################
# #
# NAME: CMakeLists.txt #
# #
# AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. #
# WRITTEN BY: Michael Brockus. #
# #
# License: MIT #
# #
###################################################################################
cmake_minimum_required(VERSION 3.13.2.0 FATAL_ERROR)
add_library("unity" STATIC)
target_sources("unity" PRIVATE "unity.c")
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册