Skip to content

Commit 08fc2d9

Browse files
author
whwu
committed
update CMakeLists.txt.
1 parent d970cca commit 08fc2d9

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
cmake_minimum_required(VERSION 3.5)
22

3-
project(ulog)
4-
53
add_subdirectory(tests)
64
add_subdirectory(src)

src/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
project(ulog)
33

44
# Add a library with the above sources
5-
add_library(${PROJECT_NAME} ulog.c)
5+
add_library(${PROJECT_NAME} EXCLUDE_FROM_ALL ulog.c)
6+
7+
target_include_directories(${PROJECT_NAME} PUBLIC .)

tests/CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
project(ulog_example)
22

3-
include_directories(${PROJECT_SOURCE_DIR}/../src)
4-
5-
add_executable(ulog_example ulog_example.c)
6-
7-
target_link_libraries(ulog_example ulog)
3+
add_executable(${PROJECT_NAME} ulog_example.c)
4+
target_include_directories(${PROJECT_NAME} PRIVATE ulog)
5+
target_link_libraries(${PROJECT_NAME} ulog)

0 commit comments

Comments
 (0)