This commit is contained in:
2025-11-16 17:27:53 -08:00
commit 8e1842d412
9 changed files with 93 additions and 0 deletions

39
src/CMakeLists.txt Normal file
View 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
View File

@@ -0,0 +1,6 @@
#include <iostream>
#include <libedbg/libedbg.hpp>
void edbg::hello() {
std::cout << "Hello edbg!\n";
}