mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 13:05:24 +08:00
55 lines
1.3 KiB
Diff
55 lines
1.3 KiB
Diff
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
|