Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.WithCustomProto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.WithCustomProto
Commits
667a5344
Commit
667a5344
authored
Apr 30, 2022
by
NzSN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CMakeLists.txt to enable install feature.
parent
eef0a7d6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
6 deletions
+32
-6
CMakeLists.txt
CMakeLists.txt
+32
-6
No files found.
CMakeLists.txt
View file @
667a5344
...
...
@@ -10,6 +10,12 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set
(
ROOT .
)
set
(
INCLUDE
${
ROOT
}
/src
${
ROOT
}
/lib/include
)
option
(
enable_trmem
"Enable/Disable TransientMemProto"
ON
)
option
(
enable_movmem
"Enable/Disable MovMemProto"
ON
)
option
(
DEBUG
"Only enable during development"
OFF
)
if
(
DEBUG
)
# Google Test
include
(
FetchContent
)
FetchContent_Declare
(
...
...
@@ -33,24 +39,44 @@ ExternalProject_Add(
INSTALL_COMMAND make install
UPDATE_COMMAND
""
)
endif
()
set
(
SRC
${
ROOT
}
/src
)
set
(
CMAKE_CXX_STANDARD 20
)
# Basics
set
(
SRC_Files
${
SRC
}
/ioctx.cc
${
SRC
}
/utils.cc
${
SRC
}
/proto/proto.cc
${
SRC
}
/proto/sharedMemProto.cc
${
SRC
}
/proto/transientMemProto.cc
${
SRC
}
/proto/proto.cc
)
# Optional Modules
if
(
enable_trmem
)
set
(
SRC_Files
${
SRC_Files
}
${
SRC
}
/proto/transientMemProto.cc
)
endif
()
if
(
enable_movmem
)
set
(
SRC_Files
${
SRC_Files
}
${
SRC
}
/proto/movMemProto.cc
)
add_library
(
smp
${
SRC_Files
}
)
endif
()
# Library
add_library
(
shmproto
${
SRC_Files
}
)
install
(
TARGETS shmproto
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
install
(
FILES
${
ROOT
}
/src/proto/proto.h
${
ROOT
}
/src/utils.h
${
ROOT
}
/src/proto/proto.h
${
ROOT
}
/src/proto/movMemProto.h
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
)
# Tests
set
(
Tests
${
ROOT
}
/tests
)
set
(
TestCases
${
Tests
}
/ioctxTestCases.cc
)
add_executable
(
unittest
${
TestCases
}
${
SRC_Files
}
)
add_dependencies
(
unittest libav
)
include_directories
(
${
INCLUDE
}
)
add_custom_command
(
TARGET unittest PRE_BUILD
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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