*/}}

CMakeLists.txt 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. cmake_minimum_required(VERSION 3.1)
  2. project(elarp)
  3. IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
  4. SET(CMAKE_INSTALL_PREFIX $ENV{HOME}/elarp CACHE PATH "Where to install eLaRP" FORCE)
  5. ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
  6. set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION ".")
  7. include (InstallRequiredSystemLibraries)
  8. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
  9. set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-no-pie")
  10. set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-no-pie")
  11. find_package(lagui REQUIRED)
  12. find_package(PNG REQUIRED)
  13. add_compile_options("$<$<C_COMPILER_ID:MSVC>:/std:c11>")
  14. add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
  15. add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
  16. add_definitions(-w)
  17. include_directories(
  18. ${LAGUI_INCLUDE_DIRS_ALL}
  19. )
  20. file(GLOB_RECURSE elarpFiles
  21. elarp_operations.c
  22. elarp.c
  23. pdfgen.c
  24. )
  25. add_executable(elarp ${elarpFiles})
  26. target_link_options(elarp PUBLIC "-Wl,--start-group")
  27. target_link_libraries(elarp
  28. ${LAGUI_SHARED_LIBS}
  29. ${PNG_LIBRARY}
  30. )