-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
69 lines (53 loc) · 1.52 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
cmake_minimum_required (VERSION 3.15.0)
set(PROJECT_NAME "libMicroNetwork")
set(LFRAMEWORK_LIB "true")
project(${PROJECT_NAME} LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD 11)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_link_options(-static-libgcc)
add_link_options(-static-libstdc++)
endif()
set(API_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Interfaces")
set(LFRAMEWORK_CONFIG_FILE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
#add_compile_options(-gdwarf-4)
message("!! ${CMAKE_SYSTEM_NAME}")
add_library(libMicroNetworkSources INTERFACE )
target_sources(libMicroNetworkSources
INTERFACE
main.cpp
Library.h
Library.cpp
LFrameworkConfig.h
)
target_include_directories(libMicroNetworkSources
INTERFACE
"${CMAKE_CURRENT_SOURCE_DIR}/Interfaces"
"${CMAKE_CURRENT_SOURCE_DIR}"
)
add_subdirectory(Dependencies)
target_compile_definitions(LFramework
INTERFACE
LF_USB_HOST
LF_THREAD_STD
LF_TERMINAL_STREAM_COUT
)
target_link_libraries(libMicroNetworkSources
INTERFACE
MicroNetworkCommon
MicroNetworkHost
MicroNetworkUser
LFramework
LFramework::Threading
LFramework::Usb
LFramework::Usb::Host
LFramework::IO
LFramework::IO::Terminal
LFramework::UnitTest
)
#target_link_libraries(libMicroNetworkSources INTERFACE pthread)
#add_executable(libMicroNetworkTest)
#target_link_libraries(libMicroNetworkTest PRIVATE libMicroNetworkSources)
add_library(MicroNetwork SHARED)
target_link_libraries(MicroNetwork PRIVATE libMicroNetworkSources)
#target_link_libraries(libMicroNetwork PRIVATE User32 Advapi32 Ole32 Winusb SetupAPI)