Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Lst
lst-data-process-128
Commits
0598c62a
Commit
0598c62a
authored
May 24, 2018
by
legoc
Browse files
Added cmake makefile for building the core library
parent
947946c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
0598c62a
...
...
@@ -11,3 +11,4 @@
/Makefile.in
/missing
/.settings/
/cmake-build/
CMakeLists.txt
0 → 100644
View file @
0598c62a
cmake_minimum_required
(
VERSION 3.0
)
# Project
project
(
lstdpp128
)
# Current version
set
(
LSTDPP128_VERSION_MAJOR 1
)
set
(
LSTDPP128_VERSION_MINOR 2
)
set
(
LSTDPP128_VERSION_PATCH 0
)
set
(
LSTDPP128_VERSION
${
LSTDPP128_VERSION_MAJOR
}
.
${
LSTDPP128_VERSION_MINOR
}
.
${
LSTDPP128_VERSION_PATCH
}
)
set
(
CMAKE_BUILD_TYPE Release
)
# Includes
include_directories
(
"
${
PROJECT_SOURCE_DIR
}
"
)
# Sources
set
(
lstdpp128_sources
src/lstdpp128/CrateBoard.cpp
src/lstdpp128/BaseAlgorithm.cpp
src/lstdpp128/Reader.cpp
src/lstdpp128/LiveReader.cpp
src/lstdpp128/EventBlockArray.cpp
src/lstdpp128/Event.cpp
src/lstdpp128/EventData.cpp
src/lstdpp128/BaseReader.cpp
src/lstdpp128/EventArray.cpp
src/lstdpp128/Insert.cpp
src/lstdpp128/Sort.cpp
src/lstdpp128/Check.cpp
)
# To compile the sources only once
add_library
(
objlib OBJECT
${
lstdpp128_sources
}
)
# Shared libraries need PIC
set_property
(
TARGET objlib PROPERTY POSITION_INDEPENDENT_CODE 1
)
# Define shared and static libraries
add_library
(
lstdpp128 SHARED $<TARGET_OBJECTS:objlib>
)
add_library
(
lstdpp128_s STATIC $<TARGET_OBJECTS:objlib>
)
# Set the version of the shared library
set_target_properties
(
lstdpp128 PROPERTIES VERSION
${
LSTDPP128_VERSION
}
SOVERSION
${
LSTDPP128_VERSION_MAJOR
}
)
# Install lib
install
(
TARGETS lstdpp128
DESTINATION lib
)
# Install include
install
(
DIRECTORY src/lstdpp128/
DESTINATION include
FILES_MATCHING PATTERN
"*.h"
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment