vcpkg/ports/opencolorio-tools/0002-msvc-cpluscplus.patch
Jack·Boos·Yu fa1823dcad
[opencolorio-tools] Separate feature application to avoid circular dependency (#12420)
* [opencolorio-tools] Separate feature application to avoid circular dependency

* [opencolorio] Remove oiio related patch

* [opencolorio] Do not make tools

* [opencolorio-tools] make sure share folder is clean

* [docs] Add format document

* improve the error message

* Check the error message

* Finish test

* Update ports/opencolorio/portfile.cmake

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>

* Use vcpkg_copy_tools

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
2020-08-10 16:05:26 -07:00

85 lines
2.7 KiB
Diff

diff --git a/src/apps/ocioconvert/CMakeLists.txt b/src/apps/ocioconvert/CMakeLists.txt
index 82b0792..7d16bdf 100644
--- a/src/apps/ocioconvert/CMakeLists.txt
+++ b/src/apps/ocioconvert/CMakeLists.txt
@@ -6,16 +6,23 @@ if (OIIO_FOUND)
${OIIO_INCLUDES}
${ILMBASE_INCLUDES}
)
-
+
file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp")
-
+
add_executable(ocioconvert ${share_src_files} main.cpp)
-
+
+ target_compile_options(ocioconvert
+ PRIVATE
+ $<$<CXX_COMPILER_ID:MSVC>:
+ /Zc:__cplusplus # Enable updated __cplusplus macro
+ >
+ )
+
set_target_properties(ocioconvert PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
target_link_libraries(ocioconvert ${OIIO_LIBRARIES} ${CMAKE_DL_LIBS})
-
+
target_link_OCIO(ocioconvert)
-
+
install(TARGETS ocioconvert EXPORT OpenColorIO DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/bin)
endif()
diff --git a/src/apps/ociodisplay/CMakeLists.txt b/src/apps/ociodisplay/CMakeLists.txt
index d11b9e1..0f27d86 100644
--- a/src/apps/ociodisplay/CMakeLists.txt
+++ b/src/apps/ociodisplay/CMakeLists.txt
@@ -11,6 +11,13 @@ if (OIIO_FOUND)
add_executable(ociodisplay main.cpp)
+ target_compile_options(ociodisplay
+ PRIVATE
+ $<$<CXX_COMPILER_ID:MSVC>:
+ /Zc:__cplusplus # Enable updated __cplusplus macro
+ >
+ )
+
# set_target_properties(ociodisplay PROPERTIES INSTALL_RPATH ${OIIO_LIBRARIES} )
set_target_properties(ociodisplay PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
target_link_libraries(ociodisplay ${GLEW_LIBRARIES} ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${OIIO_LIBRARIES})
diff --git a/src/apps/ociolutimage/CMakeLists.txt b/src/apps/ociolutimage/CMakeLists.txt
index 528333f..821155d 100644
--- a/src/apps/ociolutimage/CMakeLists.txt
+++ b/src/apps/ociolutimage/CMakeLists.txt
@@ -6,16 +6,23 @@ if (OIIO_FOUND)
${OIIO_INCLUDES}
${ILMBASE_INCLUDES}
)
-
+
file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp")
-
+
add_executable(ociolutimage ${share_src_files} main.cpp)
-
+
+ target_compile_options(ociolutimage
+ PRIVATE
+ $<$<CXX_COMPILER_ID:MSVC>:
+ /Zc:__cplusplus # Enable updated __cplusplus macro
+ >
+ )
+
set_target_properties(ociolutimage PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
target_link_libraries(ociolutimage ${OIIO_LIBRARIES} ${CMAKE_DL_LIBS})
-
+
target_link_OCIO(ociolutimage)
-
+
install(TARGETS ociolutimage EXPORT OpenColorIO DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/bin)
endif()