File tree 2 files changed +148
-134
lines changed
2 files changed +148
-134
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ project (DirectXTex
17
17
18
18
option (BUILD_TOOLS "Build tex command-line tools" ON )
19
19
20
+ option (BUILD_SHARED_LIBS "Build DirectXTex as a shared library" OFF )
21
+
20
22
option (BUILD_SAMPLE "Build DDSView sample (requires fxc.exe)" ON )
21
23
22
24
# Includes the functions for Direct3D 11 resources and DirectCompute compression
@@ -220,7 +222,12 @@ if(BUILD_DX11 AND WIN32 AND (NOT (XBOX_CONSOLE_TARGET STREQUAL "durango")))
220
222
endif ()
221
223
endif ()
222
224
223
- add_library (${PROJECT_NAME} STATIC ${LIBRARY_SOURCES} ${LIBRARY_HEADERS} )
225
+ add_library (${PROJECT_NAME} ${LIBRARY_SOURCES} ${LIBRARY_HEADERS} )
226
+
227
+ if (WIN32 AND BUILD_SHARED_LIBS )
228
+ target_compile_definitions (${PROJECT_NAME} PRIVATE DXTEX_EXPORT)
229
+ target_compile_definitions (${PROJECT_NAME} INTERFACE DXTEX_IMPORT)
230
+ endif ()
224
231
225
232
if (BUILD_DX11 AND WIN32 )
226
233
target_include_directories (${PROJECT_NAME} PRIVATE ${COMPILED_SHADERS} )
You can’t perform that action at this time.
0 commit comments