mirror of
https://github.com/Akagi201/lw_oopc.git
synced 2024-12-24 23:48:53 +08:00
21 lines
635 B
CMake
21 lines
635 B
CMake
cmake_minimum_required(VERSION 3.0)
|
|
project(lw_oopc VERSION 1.2)
|
|
add_library(${PROJECT_NAME} lw_oopc.c lw_oopc.h)
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
target_include_directories(${PROJECT_NAME} PUBLIC
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
|
$<INSTALL_INTERFACE:include>
|
|
)
|
|
install(FILES lw_oopc.h DESTINATION include)
|
|
install(EXPORT ${PROJECT_NAME}Targets
|
|
FILE ${PROJECT_NAME}Config.cmake
|
|
DESTINATION lib/cmake/${PROJECT_NAME}
|
|
)
|
|
install(TARGETS ${PROJECT_NAME}
|
|
EXPORT ${PROJECT_NAME}Targets
|
|
PUBLIC_HEADER DESTINATION include
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib
|
|
RUNTIME DESTINATION bin
|
|
)
|