1 cmake_minimum_required(VERSION 3.0.2)
5 include(CheckLibraryExists)
9 set(CPP_DEFS ${CPP_DEFS} _WIN32)
12 check_library_exists(m pow "" HAVE_LIBM)
14 add_executable(bin2h bin2h.c)
15 # Enforce no dressing for executable names, so the main script can find it
16 set_target_properties(bin2h PROPERTIES OUTPUT_NAME bin2h)
17 # Avoid configuration-dependent subdirectories while building with Visual Studio
18 set_target_properties(bin2h PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}")
19 set_target_properties(bin2h PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}")
20 target_compile_definitions(bin2h PRIVATE ${CPP_DEFS})
22 add_executable(bsincgen bsincgen.c)
23 set_target_properties(bsincgen PROPERTIES OUTPUT_NAME bsincgen)
24 set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}")
25 set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}")
26 target_compile_definitions(bsincgen PRIVATE ${CPP_DEFS})
28 target_link_libraries(bsincgen m)