project( nbvtf ) # RGBCX C++ -> C Wrapper object add_library( rgbcx OBJECT librgbcx.cpp ) # NBVTF C object add_library( onbvtf OBJECT nbvtf.c ) target_compile_definitions( onbvtf PRIVATE USE_LIBRGBCX ) set_property( TARGET onbvtf PROPERTY POSITION_INDEPENDENT_CODE ON ) # NBVTF Shared object add_library( ${PROJECT_NAME} SHARED ) target_link_libraries( ${PROJECT_NAME} PRIVATE rgbcx onbvtf ) target_compile_options( ${PROJECT_NAME} PRIVATE -Wall -Wno-unused-variable -Wno-unused-function -std=c99 -pedantic ) # Extra tools add_library( otovtf OBJECT vtf_cmd.c nbvtf.h ) target_compile_definitions( otovtf PRIVATE USE_LIBRGBCX ) add_executable( tovtf ) target_link_libraries( tovtf PRIVATE rgbcx otovtf ) add_library( otodds OBJECT dds_cmd.c nbvtf.h ) target_compile_definitions( otodds PRIVATE USE_LIBRGBCX ) add_executable( todds ) target_link_libraries( todds PRIVATE rgbcx otodds )