CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. include("${razer_SOURCE_DIR}/scripts/cmake.global")
  2. option(LIBRAZER_SHARED "Build librazer as a shared library" ON)
  3. if (LIBRAZER_SHARED)
  4. set(SHARED_OR_STATIC "SHARED")
  5. else (LIBRAZER_SHARED)
  6. set(SHARED_OR_STATIC "STATIC")
  7. endif (LIBRAZER_SHARED)
  8. add_library(razer ${SHARED_OR_STATIC}
  9. buttonmapping.c
  10. profile_emulation.c
  11. librazer.c
  12. config.c
  13. util.c
  14. synapse.c
  15. cypress_bootloader.c
  16. hw_boomslangce.c
  17. hw_copperhead.c
  18. hw_deathadder.c
  19. hw_deathadder2013.c
  20. hw_deathadder_chroma.c
  21. hw_krait.c
  22. hw_lachesis.c
  23. hw_lachesis5k6.c
  24. hw_naga.c
  25. hw_imperator.c
  26. hw_taipan.c
  27. hw_mamba_tournament_edition.c
  28. hw_diamondback_chroma.c)
  29. set_target_properties(razer PROPERTIES COMPILE_FLAGS ${GENERIC_COMPILE_FLAGS}
  30. SOVERSION 1)
  31. target_link_libraries(razer usb-1.0)
  32. install(TARGETS razer DESTINATION lib)
  33. if (NOT DEFINED ENV{RPM_BUILD_ROOT} AND NOT DEFINED ENV{RAZERCFG_PKG_BUILD})
  34. install_exec_cmd("ldconfig"
  35. "Your system will probably be unable to locate librazer.so library")
  36. endif (NOT DEFINED ENV{RPM_BUILD_ROOT} AND NOT DEFINED ENV{RAZERCFG_PKG_BUILD})