# We need to generate toFloat.h
ADD_EXECUTABLE(toFloat toFloat.cpp)
GET_TARGET_PROPERTY(TOFLOAT_EXE toFloat LOCATION)
ADD_CUSTOM_COMMAND(
   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/toFloat.h
   COMMAND ${TOFLOAT_EXE} > ${CMAKE_CURRENT_SOURCE_DIR}/toFloat.h
   DEPENDS toFloat
 )
 
ADD_EXECUTABLE(eLut eLut.cpp)
GET_TARGET_PROPERTY(eLut_EXE eLut LOCATION)
ADD_CUSTOM_COMMAND(
   OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/eLut.h
   COMMAND ${eLut_EXE} > ${CMAKE_CURRENT_SOURCE_DIR}/eLut.h
   DEPENDS eLut
 )

ADD_LIBRARY(libhalf cinepaint_half.cpp half.cpp
                    toFloat.h eLut.h)
