This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhaoyijun-nat-format/CMakeLists.txt
2024-08-27 11:02:31 +08:00

38 lines
1.4 KiB
CMake

cmake_minimum_required(VERSION 2.8)
set(lib_name nat_format)
project(${lib_name})
add_definitions(-fPIC -Wall -g)
set(CMAKE_MACOSX_RPATH 0)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wall)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
set(CMAKE_INSTALL_PREFIX /home/mesasoft/sapp_run)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__FILENAME__='\"$(subst ${CMAKE_CURRENT_SOURCE_DIR}/,,$(abspath $<))\"'")
set (NAT_FORMAT_SRC "src/nat_format.cpp")
include_directories(/opt/MESA/include/)
include_directories(inc)
include_directories(src)
set(PLUG_NAT_FORMAT_DEPEND_DYN_LIB MESA_handle_logger MESA_prof_load)
add_library(${lib_name} SHARED ${NAT_FORMAT_SRC})
target_link_libraries(${lib_name} ${PLUG_NAT_FORMAT_DEPEND_DYN_LIB})
set_target_properties(${lib_name} PROPERTIES PREFIX "")
if(DEFINED MESA_SHARED_INSTALL_DIR)
set_target_properties(${lib_name} PROPERTIES OUTPUT_NAME ${lib_name} LIBRARY_OUTPUT_DIRECTORY ${MESA_SHARED_INSTALL_DIR})
else()
set_target_properties(${lib_name} PROPERTIES OUTPUT_NAME ${lib_name})
endif()
install(TARGETS ${lib_name} LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/plug/business/nat_format)
install(FILES bin/conf/${lib_name}.inf DESTINATION ${CMAKE_INSTALL_PREFIX}/plug/business/nat_format)
install(FILES bin/conf/${lib_name}.conf DESTINATION ${CMAKE_INSTALL_PREFIX}/conf)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(Version)
include(Package)