ENH: The logic for defining OPJ_STATIC has now been moved to the
[openjpeg.git] / CMakeLists.txt
index 1c8b85341fb808da640fd1af53ecee6632bdffcd..8cb57be74a4570b56bc0359cb1d739a43db1e714 100644 (file)
@@ -143,6 +143,13 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in
                @ONLY IMMEDIATE)
 ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in)
 
+#-----------------------------------------------------------------------------
+# Translate CMake configuration options into #defines that can be queried from
+# the code.
+CONFIGURE_FILE(
+   ${PROJECT_SOURCE_DIR}/openjpegConfigure.h.in
+   ${PROJECT_BINARY_DIR}/openjpegConfigure.h)
+
 #-----------------------------------------------------------------------------
 # Always build the library
 INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})