init
This commit is contained in:
39
src/CMakeLists.txt
Normal file
39
src/CMakeLists.txt
Normal file
@@ -0,0 +1,39 @@
|
||||
add_library(libedbg libedbg.cpp)
|
||||
add_library(edbg::libedbg ALIAS libedbg)
|
||||
|
||||
set_target_properties(
|
||||
libedbg
|
||||
PROPERTIES OUTPUT_NAME edbg
|
||||
)
|
||||
|
||||
target_compile_features(libedbg PUBLIC cxx_std_20)
|
||||
|
||||
target_include_directories(
|
||||
libedbg
|
||||
PUBLIC
|
||||
$<INSTALL_INTERFACE::include>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src/include
|
||||
)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS libedbg
|
||||
EXPORT edbg-targets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
install(
|
||||
DIRECTORY ${PROJECT_SOURCE_DIR}/include/
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
|
||||
install(
|
||||
EXPORT edbg-targets
|
||||
FILE edbg-config.cmake
|
||||
NAMESPACE edbg::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/edbg
|
||||
)
|
||||
6
src/libedbg.cpp
Normal file
6
src/libedbg.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <iostream>
|
||||
#include <libedbg/libedbg.hpp>
|
||||
|
||||
void edbg::hello() {
|
||||
std::cout << "Hello edbg!\n";
|
||||
}
|
||||
Reference in New Issue
Block a user