forked from chafey/openjpegjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (25 loc) · 915 Bytes
/
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
cmake_minimum_required(VERSION 3.16)
project (openjpegjs
LANGUAGES CXX)
# set the build type if not specified
set(default_build_type "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}")
endif()
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/openjpeg/CMakeLists.txt")
message(FATAL_ERROR "The submodules were not downloaded! GIT_SUBMODULE was turned off or failed. Please update submodules and try again.")
endif()
option(BUILD_SHARED_LIBS "" OFF)
option(BUILD_STATIC_LIBS "" ON)
option(OPJ_USE_THREAD "Build with thread/mutex support " OFF)
# add the external library
add_subdirectory(openjpeg EXCLUDE_FROM_ALL)
# add the js wrapper
if(EMSCRIPTEN)
add_subdirectory(src)
endif()
# c++ native test case
if(NOT EMSCRIPTEN)
add_subdirectory(test/cpp)
endif()