BuildSystem: Move all userpace libraries under the userspace directory
As the number of libraries is increasing, root directory starts to expand. This adds better organization for libraries
This commit is contained in:
24
userspace/libraries/LibInput/CMakeLists.txt
Normal file
24
userspace/libraries/LibInput/CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
cmake_minimum_required(VERSION 3.26)
|
||||
|
||||
project(libinput CXX)
|
||||
|
||||
set(LIBINPUT_SOURCES
|
||||
KeyEvent.cpp
|
||||
KeyboardLayout.cpp
|
||||
)
|
||||
|
||||
add_custom_target(libinput-headers
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_CURRENT_SOURCE_DIR}/include/ ${BANAN_INCLUDE}/
|
||||
DEPENDS sysroot
|
||||
)
|
||||
|
||||
add_library(libinput ${LIBINPUT_SOURCES})
|
||||
target_link_libraries(libinput PUBLIC libc ban)
|
||||
|
||||
add_custom_target(libinput-install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/libinput.a ${BANAN_LIB}/
|
||||
DEPENDS libinput
|
||||
BYPRODUCTS ${BANAN_LIB}/libinput.a
|
||||
)
|
||||
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "")
|
||||
Reference in New Issue
Block a user