-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (42 loc) · 1.22 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
45
46
47
48
49
50
51
52
# Copyright 2022-present Contributors to the logctool project.
# SPDX-License-Identifier: BSD-3-Clause
# https://github.com/mikaelsundell/logctool
cmake_minimum_required (VERSION 3.23)
set (project_name "logctool")
project ("${project_name} project")
# imath
find_package (Imath CONFIG REQUIRED)
find_package (OpenImageIO CONFIG REQUIRED)
find_package (OpenColorIO CONFIG REQUIRED)
# package
add_executable (${project_name} "logctool.cpp")
target_link_libraries (${project_name}
PRIVATE
Imath::Imath
OpenImageIO::OpenImageIO
OpenColorIO::OpenColorIO
)
set_property (TARGET ${project_name} PROPERTY CXX_STANDARD 14)
add_custom_command (
TARGET ${project_name}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/fonts
$<TARGET_FILE_DIR:${project_name}>/fonts
)
add_custom_command (
TARGET ${project_name}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/resources
$<TARGET_FILE_DIR:${project_name}>/resources
)
install (TARGETS ${project_name}
RUNTIME DESTINATION bin
)
install (DIRECTORY ${CMAKE_SOURCE_DIR}/fonts
DESTINATION bin
)
install (DIRECTORY ${CMAKE_SOURCE_DIR}/resources
DESTINATION bin
)