mirror of
https://github.com/MaJerle/lwmem.git
synced 2025-01-26 06:02:54 +08:00
Update cmake to allow generation as lib or standalone
This commit is contained in:
parent
62d0c40f01
commit
cbc215be11
@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.0.0)
|
||||
|
||||
# Setup project
|
||||
project(LwMEM VERSION 2.0.1)
|
||||
set(LWMEM_LIB_NAME lwmem)
|
||||
|
||||
# ------------------------
|
||||
# Configuration used if this is used as
|
||||
|
@ -16,7 +16,7 @@ endif()
|
||||
add_library(${LWMEM_LIB_NAME} INTERFACE)
|
||||
|
||||
# Setup generic source files
|
||||
target_sources(${LWMEM_LIB_NAME} INTERFACE
|
||||
target_sources(${LWMEM_LIB_NAME} PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}/src/lwmem/lwmem.c
|
||||
${CMAKE_CURRENT_LIST_DIR}/src/system/lwmem_sys_${LWMEM_SYS_ARCH}.c
|
||||
)
|
||||
@ -24,4 +24,4 @@ target_sources(${LWMEM_LIB_NAME} INTERFACE
|
||||
# Setup include directories
|
||||
target_include_directories(${LWMEM_LIB_NAME} INTERFACE
|
||||
${CMAKE_CURRENT_LIST_DIR}/src/include
|
||||
)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user