vcpkg/ports/ilmbase/fix-parallel-build.patch

55 lines
1.3 KiB
Diff
Raw Normal View History

2017-06-10 22:54:03 +08:00
diff --git a/Half/CMakeLists.txt b/Half/CMakeLists.txt
index 6f9714d..0c43904 100644
--- a/Half/CMakeLists.txt
+++ b/Half/CMakeLists.txt
@@ -2,10 +2,10 @@
ADD_EXECUTABLE ( eLut eLut.cpp )
-ADD_CUSTOM_COMMAND (
- TARGET eLut POST_BUILD
+ADD_CUSTOM_TARGET ( make_eLut
COMMAND eLut > ${CMAKE_CURRENT_BINARY_DIR}/eLut.h
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ DEPENDS eLut
)
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_CURRENT_BINARY_DIR}/eLut.h
@@ -13,25 +13,16 @@ SET_SOURCE_FILES_PROPERTIES(
)
ADD_EXECUTABLE ( toFloat toFloat.cpp )
-ADD_CUSTOM_COMMAND (
- TARGET toFloat POST_BUILD
+ADD_CUSTOM_TARGET ( make_toFloat
COMMAND toFloat > ${CMAKE_CURRENT_BINARY_DIR}/toFloat.h
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ DEPENDS toFloat
)
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_CURRENT_BINARY_DIR}/toFloat.h
PROPERTIES HEADER_FILE_ONLY TRUE
)
-SET_SOURCE_FILES_PROPERTIES(
- half.cpp
- PROPERTIES
- OBJECT_DEPENDS
- ${CMAKE_CURRENT_BINARY_DIR}/eLut.h
- OBJECT_DEPENDS
- ${CMAKE_CURRENT_BINARY_DIR}/toFloat.h
- )
-
IF(BUILD_SHARED_LIBS)
ADD_DEFINITIONS(-DHALF_EXPORTS)
ENDIF()
@@ -41,7 +32,7 @@ ADD_LIBRARY ( Half ${LIB_TYPE}
)
-ADD_DEPENDENCIES ( Half toFloat eLut )
+ADD_DEPENDENCIES ( Half make_toFloat make_eLut )
INSTALL ( TARGETS
Half