🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.1 KiB

  1. cmake_minimum_required(VERSION 3.0.2)
  2. project(native-tools)
  3. include(CheckLibraryExists)
  4. set(CPP_DEFS )
  5. if(WIN32)
  6. set(CPP_DEFS ${CPP_DEFS} _WIN32)
  7. endif(WIN32)
  8. check_library_exists(m pow "" HAVE_LIBM)
  9. add_executable(bin2h bin2h.c)
  10. # Enforce no dressing for executable names, so the main script can find it
  11. set_target_properties(bin2h PROPERTIES OUTPUT_NAME bin2h)
  12. # Avoid configuration-dependent subdirectories while building with Visual Studio
  13. set_target_properties(bin2h PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}")
  14. set_target_properties(bin2h PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}")
  15. target_compile_definitions(bin2h PRIVATE ${CPP_DEFS})
  16. add_executable(bsincgen bsincgen.c)
  17. set_target_properties(bsincgen PROPERTIES OUTPUT_NAME bsincgen)
  18. set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}")
  19. set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}")
  20. target_compile_definitions(bsincgen PRIVATE ${CPP_DEFS})
  21. if(HAVE_LIBM)
  22. target_link_libraries(bsincgen m)
  23. endif(HAVE_LIBM)