@@ -9,29 +9,7 @@ add_library(lsl ${LSL_LIB_TYPE} src/buildinfo.cpp)
9
9
10
10
# Configure main library
11
11
12
- # Set compile definitions for lsl
13
- target_compile_definitions (lsl
14
- PUBLIC
15
- # defines for LSL_CPP_API export header (shared: dllimport/dllexport)
16
- $< IF:$< BOOL:${LSL_BUILD_STATIC} > ,LIBLSL_STATIC,LIBLSL_EXPORTS>
17
- # don't use #pragma(lib) in MSVC builds. TODO: Maybe this can be inherited from lslobj or removed on lslobj?
18
- $< $< CXX_COMPILER_ID:MSVC> :LSLNOAUTOLINK>
19
- )
20
-
21
- target_link_libraries (lsl
22
- PRIVATE
23
- lslobj # TODO: If this is public, does that improve inheritance of includes and compile definitions?
24
- lslboost # TODO: Shouldn't be needed -- lslobj already links it
25
- ${PUGIXML_LIBRARIES}
26
- )
27
-
28
- # Includes. TODO: Can we not inherit these from lslobj?
29
- target_include_directories (lsl
30
- INTERFACE
31
- $< BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include>
32
- $< INSTALL_INTERFACE:include>
33
- )
34
-
12
+ # Some naming metadata for export
35
13
set_target_properties (lsl PROPERTIES
36
14
VERSION ${liblsl_VERSION_MAJOR} .${liblsl_VERSION_MINOR}.${liblsl_VERSION_PATCH}
37
15
SOVERSION ${LSL_ABI_VERSION}
@@ -44,3 +22,27 @@ if(LSL_FORCE_FANCY_LIBNAME)
44
22
DEBUG_POSTFIX "-debug"
45
23
)
46
24
endif ()
25
+
26
+ # Includes. TODO: Can we not inherit these from lslobj?
27
+ target_include_directories (lsl
28
+ INTERFACE
29
+ $< BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include>
30
+ $< INSTALL_INTERFACE:include>
31
+ )
32
+
33
+ # Link dependencies. The biggest dependency is lslobj, which contains the bulk of the library code.
34
+ target_link_libraries (lsl
35
+ PRIVATE
36
+ lslobj # TODO: If this is public, does that improve inheritance of includes and compile definitions?
37
+ lslboost # TODO: Shouldn't be needed -- lslobj already links it
38
+ ${PUGIXML_LIBRARIES}
39
+ )
40
+
41
+ # Set compile definitions for lsl
42
+ target_compile_definitions (lsl
43
+ PUBLIC
44
+ # defines for LSL_CPP_API export header (shared: dllimport/dllexport)
45
+ $< IF:$< BOOL:${LSL_BUILD_STATIC} > ,LIBLSL_STATIC,LIBLSL_EXPORTS>
46
+ # don't use #pragma(lib) in MSVC builds. TODO: Maybe this can be inherited from lslobj or removed on lslobj?
47
+ $< $< CXX_COMPILER_ID:MSVC> :LSLNOAUTOLINK>
48
+ )
0 commit comments