-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
55 lines (46 loc) · 1.74 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
cmake_minimum_required(VERSION 2.6)
project(mayaOpenImageIOReader)
set(PLUGIN_NAME oiioImageReader)
set(CMAKE_CXX_STANDARD 11)
# Maya SDK
set(MAYA_INCLUDE_PATH "/usr/autodesk/maya2016/include" CACHE PATH "Maya include directory")
set(MAYA_LIB_PATH "/usr/autodesk/maya2016/lib" CACHE PATH "Maya library directory")
# OpenImageIO
set(OIIO_INCLUDE_PATH "/usr/local/include" CACHE PATH "OpenImageIO include directory")
set(OIIO_LIB_PATH "/usr/local/lib" CACHE PATH "OpenImageIO library directory")
# Compile Options
set(THREAD_NUM "1" CACHE STRING "Number of threads OpenImageIO will use.")
set(CACHE_MEM "512" CACHE STRING "Size of the OpenImageIO ImageCache in megabytes")
set(READ_EXR "1" CACHE STRING "Use OIIO to read EXR (.exr) files?")
set(READ_DPX "1" CACHE STRING "Use OIIO to read DPX (.dpx) files?")
set(READ_CINEON "1" CACHE STRING "Use OIIO to read Cineon (.cin) files?")
set(READ_HDR "1" CACHE STRING "Use OIIO to read Radiance HDR (.hdr) files?")
set(READ_TX "1" CACHE STRING "Use OIIO to read TX Texture (.tx) files?")
set(SOURCE_FILES
include/oiioReader.h
src/oiioReader.cpp
src/pluginMain.cpp)
include_directories(
include
${UTILS_INCLUDE}
${MAYA_INCLUDE_PATH}
$(OIIO_INCLUDE_PATH)
)
link_directories(
${LIBRARY_OUTPUT_PATH}
${MAYA_LIB_PATH}
${OIIO_LIB_PATH}
)
add_library(${PLUGIN_NAME} SHARED ${SOURCE_FILES})
set_target_properties(${PLUGIN_NAME} PROPERTIES
LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/plugin.map -Wl,--strip-all")
target_link_libraries(${PLUGIN_NAME}
OpenMaya
Foundation
OpenImageIO
z
m
)
set_target_properties(${PLUGIN_NAME} PROPERTIES
PREFIX "" # no 'lib' prefix to .so files
)