1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 08:25:58 +01:00
Files
Unity/CMakeLists.txt
richardhob 53916f823c Update CMakeLists.txt
Update the CMAKE minimum version from `3` to `3.0` to fix error in Windows 10 x64 with CMAKE 3.15.4:

cmake_minimum_required could not parse VERSION "3".
2019-10-02 11:38:48 -07:00

41 lines
1.7 KiB
CMake

###################################################################################
# #
# NAME: CMakeLsits.txt #
# #
# AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. #
# WRITTEN BY: Michael Brockus. #
# #
# License: MIT #
# #
###################################################################################
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(unity LANGUAGES C DESCRIPTION "C Unit testing framework.")
add_subdirectory("src")
target_include_directories("unity"
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>"
"$<INSTALL_INTERFACE:src>"
PRIVATE "src"
)
add_library("unity::framework" ALIAS "unity")
install(TARGETS "unity" EXPORT "unityConfig"
ARCHIVE DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_BINDIR}"
INCLUDES DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install(DIRECTORY src/ DESTINATION src)
install(EXPORT unityConfig DESTINATION share/unityConfig/cmake)
# This makes the project importable from the build directory
export(TARGETS unity FILE unityConfig.cmake)