Update to CMake, tweaks & dds
[convexer.git] / nbvtf / CMakeLists.txt
1 project( nbvtf )
2
3 # RGBCX C++ -> C Wrapper object
4 add_library( rgbcx OBJECT librgbcx.cpp )
5
6 # NBVTF C object
7 add_library( onbvtf OBJECT nbvtf.c )
8 target_compile_definitions( onbvtf PRIVATE USE_LIBRGBCX )
9 set_property( TARGET onbvtf PROPERTY POSITION_INDEPENDENT_CODE ON )
10
11 # NBVTF Shared object
12 add_library( ${PROJECT_NAME} SHARED )
13 target_link_libraries( ${PROJECT_NAME} PRIVATE rgbcx onbvtf )
14
15 target_compile_options( ${PROJECT_NAME}
16 PRIVATE -Wall -Wno-unused-variable -Wno-unused-function
17 -std=c99 -pedantic
18 )
19
20 # Extra tools
21 add_library( otovtf OBJECT vtf_cmd.c nbvtf.h )
22 target_compile_definitions( otovtf PRIVATE USE_LIBRGBCX )
23 add_executable( tovtf )
24 target_link_libraries( tovtf PRIVATE rgbcx otovtf )
25
26 add_library( otodds OBJECT dds_cmd.c nbvtf.h )
27 target_compile_definitions( otodds PRIVATE USE_LIBRGBCX )
28 add_executable( todds )
29 target_link_libraries( todds PRIVATE rgbcx otodds )