forked from ThrowTheSwitch/Unity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
44 lines (33 loc) · 1.75 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
###################################################################################
# #
# NAME: CMakeLsits.txt #
# #
# AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. #
# WRITTEN BY: Michael Brockus. #
# #
# License: MIT #
# #
###################################################################################
if(ZEPHYR_BASE)
include(CMakeListsZephyr.txt)
else()
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(hunt LANGUAGES C DESCRIPTION "C Unit testing framework.")
add_subdirectory("src")
target_include_directories("hunt"
PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>"
"$<INSTALL_INTERFACE:src>"
PRIVATE "src"
)
add_library("hunt::framework" ALIAS "hunt")
install(TARGETS "hunt" EXPORT "huntConfig"
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 huntConfig DESTINATION share/huntConfig/cmake)
# This makes the project importable from the build directory
export(TARGETS hunt FILE huntConfig.cmake)
endif()