12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- cmake_minimum_required(VERSION 3.1)
- project(elarp)
- IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- SET(CMAKE_INSTALL_PREFIX $ENV{HOME}/elarp CACHE PATH "Where to install eLaRP" FORCE)
- ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION ".")
- include (InstallRequiredSystemLibraries)
- set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
- set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-no-pie")
- set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-no-pie")
- find_package(lagui REQUIRED)
- find_package(PNG REQUIRED)
- add_compile_options("$<$<C_COMPILER_ID:MSVC>:/std:c11>")
- add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
- add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
- add_definitions(-w)
- include_directories(
- ${LAGUI_INCLUDE_DIRS_ALL}
- )
- file(GLOB_RECURSE elarpFiles
- elarp_operations.c
- elarp.c
- pdfgen.c
- )
- add_executable(elarp ${elarpFiles})
- target_link_options(elarp PUBLIC "-Wl,--start-group")
- target_link_libraries(elarp
- ${LAGUI_SHARED_LIBS}
- ${PNG_LIBRARY}
- )
|