From 004a1d3b00f7bae54b30e042cee572724f7ef368 Mon Sep 17 00:00:00 2001 From: lijia Date: Fri, 29 Oct 2021 10:28:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DCI=E7=BC=96=E8=AF=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 -- src/CMakeLists.txt | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a77f55a..9584f8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,8 +38,6 @@ add_subdirectory(./vendor) add_subdirectory(./src) add_subdirectory(./test) -#install(TARGETS ${lib_name}_shared LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib COMPONENT LIBRARY) - install(FILES inc/MESA_jump_layer.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/MESA COMPONENT HEADER) include(Package) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4f7e250..dfab3d0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,9 +17,11 @@ add_definitions(-DSAPP_V4=1) add_definitions(-fPIC) add_definitions(-std=c++11) -add_library(${lib_name} SHARED MESA_jump_layer.cpp) +set(SRC MESA_jump_layer.cpp) + +add_library(${lib_name} SHARED ${SRC}) target_link_libraries(${lib_name} m) -install(FILES ${CMAKE_BINARY_DIR}/src/libMESA_jump_layer.so DESTINATION ${CMAKE_INSTALL_PREFIX}/lib COMPONENT LIBRARY) +install(FILES ${CMAKE_BINARY_DIR}/src/libMESA_jump_layer.so DESTINATION ${CMAKE_INSTALL_PREFIX}/lib COMPONENT LIBRARIES)