Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions cmake/Installation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,20 @@ install(
DESTINATION ${LSL_CONFIG_INSTALL_DIR}
)

# Generate pkg-config file
if(LSL_UNIXFOLDERS AND NOT (APPLE AND LSL_FRAMEWORK))
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/lsl.pc.in
${CMAKE_CURRENT_BINARY_DIR}/lsl.pc
@ONLY
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/lsl.pc
COMPONENT liblsl
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
endif()

if(APPLE AND LSL_FRAMEWORK AND NOT IOS)
# Create symlinks for the framework. The variables we want to use to identify the symlink locations
# are not available at install time. Instead, we create a script during configuration time that will
Expand Down
2 changes: 1 addition & 1 deletion cmake/ProjectOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ string(COMPARE EQUAL "${CMAKE_BUILD_TYPE}" "Debug" _LSL_DEBUGLOG_DEFAULT)
option(LSL_DEBUGLOG "Enable (lots of) additional debug messages" ${_LSL_DEBUGLOG_DEFAULT})
option(LSL_UNIXFOLDERS "Use the unix folder layout for install targets" ON)
option(LSL_BUILD_STATIC "Build LSL as a static library." OFF)
option(LSL_FRAMEWORK "Build LSL as an Apple Framework (Mac only)" ON)
option(LSL_FRAMEWORK "Build LSL as an Apple framework" ${APPLE})
option(LSL_LEGACY_CPP_ABI "Build legacy C++ ABI into lsl-static" OFF)
option(LSL_OPTIMIZATIONS "Enable some more compiler optimizations" ON)
option(LSL_BUNDLED_BOOST "Use the bundled Boost by default" ON)
Expand Down
9 changes: 9 additions & 0 deletions lsl.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@

Name: liblsl
Description: @PROJECT_DESCRIPTION@
Version: @PROJECT_VERSION@
Libs: -L${libdir} -llsl
Cflags: -I${includedir}
Loading