File: sample.cmake

package info (click to toggle)
restinio 0.6.19%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 8,184 kB
  • sloc: cpp: 110,712; ruby: 2,612; makefile: 22; sh: 21
file content (23 lines) | stat: -rw-r--r-- 550 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
IF (NOT SAMPLE)
	message(FATAL_ERROR "SAMPLE is not defined!")
ENDIF ()

IF(NOT SAMPLE_SRCFILES)
	SET(SAMPLE_SRCFILES main.cpp)
ENDIF()

add_executable(${SAMPLE} ${SAMPLE_SRCFILES})

TARGET_LINK_LIBRARIES(${SAMPLE} PRIVATE restinio::restinio)
TARGET_INCLUDE_DIRECTORIES(${SAMPLE} PRIVATE ${CMAKE_SOURCE_DIR}/args)

link_threads_if_necessary(${SAMPLE})
link_atomic_if_necessary(${SAMPLE})

IF (WIN32)
	TARGET_LINK_LIBRARIES(${SAMPLE} PRIVATE wsock32 ws2_32)
ENDIF ()

IF (RESTINIO_INSTALL_SAMPLES)
	install(TARGETS ${SAMPLE} DESTINATION bin)
endif ()