-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
65 lines (55 loc) · 1.88 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
53
54
55
56
57
58
59
60
61
62
63
64
65
cmake_minimum_required(VERSION 3.22)
project(MyFantasyTools)
set(CMAKE_CXX_STANDARD 17)
#-------Find Python-------
find_package(Python 3.10 EXACT COMPONENTS Interpreter Development REQUIRED)
#-------Set Up Third Party Dependencies-------
set(FETCHCONTENT_BASE_DIR ${CMAKE_BINARY_DIR}/third_party)
include(FetchContent)
message("Configuring libjxl")
FetchContent_Declare(
libjxl
GIT_REPOSITORY https://github.com/libjxl/libjxl.git
GIT_TAG v0.9.2
)
set(JPEGXL_STATIC true)
FetchContent_GetProperties(libjxl)
if(NOT libjxl_POPULATED)
FetchContent_Populate(libjxl)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
add_subdirectory(${libjxl_SOURCE_DIR} ${libjxl_BINARY_DIR})
endif()
message("Configuring flatbuffers")
FetchContent_Declare(
flatbuffers
GIT_REPOSITORY https://github.com/google/flatbuffers.git
GIT_TAG v23.5.26
)
FetchContent_GetProperties(flatbuffers)
if(NOT flatbuffers_POPULATED)
FetchContent_Populate(flatbuffers)
add_subdirectory(${flatbuffers_SOURCE_DIR} ${flatbuffers_BINARY_DIR})
endif()
message("Configuring pybind")
FetchContent_Declare(
pybind
GIT_REPOSITORY https://github.com/pybind/pybind11.git
GIT_TAG v2.11.1
)
FetchContent_GetProperties(pybind)
if(NOT pybind_POPULATED)
FetchContent_Populate(pybind)
add_subdirectory(${pybind_SOURCE_DIR} ${pybind_BINARY_DIR})
endif()
#-------Compile MFT Tools and Libraries-------
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(GENERATED_DIR ${CMAKE_BINARY_DIR}/generated)
file(MAKE_DIRECTORY ${GENERATED_DIR})
add_subdirectory(source/flatbuffers)
add_subdirectory(source/utilities)
add_subdirectory(source/python)
add_subdirectory(source/library)