forked from iTeam-org/PortabilityCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
26 lines (22 loc) · 832 Bytes
/
CMakeLists.txt
File metadata and controls
26 lines (22 loc) · 832 Bytes
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
cmake_minimum_required(VERSION 3.10)
project(libportability)
set(CMAKE_C_STANDARD 99)
# create only a static library
add_library(libportability STATIC portability.c portability.h)
# test the library
add_executable(testlibrary test.c)
target_link_libraries(testlibrary PRIVATE libportability)
# documentation
# find the doxygen program
find_package(Doxygen REQUIRED)
set(DOXYGEN_CONFIG_FILE ${PROJECT_SOURCE_DIR}/doc/Doxyfile)
if(DOXYGEN_FOUND)
doxygen_add_docs(
doc # Target name for the documentation
portability.h portability.c # Directories/files to document
COMMENT "Generating API documentation with Doxygen" # Optional comment
CONFIG_FILE ${DOXYGEN_CONFIG_FILE}
)
else()
message(WARNING "Doxygen is needed to build the documentation but was not found.")
endif()