Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
7ca97fc0
Commit
7ca97fc0
authored
Feb 28, 2015
by
Alex Richardson
Committed by
Branislav Katreniak
Apr 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify the install(TARGETS ...) CMake calls
parent
f7d685be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
CMakeLists.txt
c++/CMakeLists.txt
+8
-0
CMakeLists.txt
c++/src/capnp/CMakeLists.txt
+5
-5
CMakeLists.txt
c++/src/kj/CMakeLists.txt
+3
-3
No files found.
c++/CMakeLists.txt
View file @
7ca97fc0
...
...
@@ -28,6 +28,14 @@ set(INCLUDE_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/include"
CACHE PATH
"Installation directory for header files (default: prefix/include)."
)
# these arguments are passed to all install(TARGETS) calls
set
(
INSTALL_TARGETS_DEFAULT_ARGS
EXPORT CapnProtoTargets
ARCHIVE DESTINATION
"
${
LIB_INSTALL_DIR
}
"
LIBRARY DESTINATION
"
${
LIB_INSTALL_DIR
}
"
RUNTIME DESTINATION
"
${
BIN_INSTALL_DIR
}
"
)
# Options ======================================================================
option
(
BUILD_TOOLS
"Build command-line tools and compiler."
ON
)
...
...
c++/src/capnp/CMakeLists.txt
View file @
7ca97fc0
...
...
@@ -59,7 +59,7 @@ add_library(capnp ${capnp_sources})
target_link_libraries
(
capnp kj
)
#make sure external consumers don't need to manually set the include dirs
target_include_directories
(
capnp INTERFACE $<INSTALL_INTERFACE:include>
)
install
(
TARGETS capnp
EXPORT CapnProtoTargets ARCHIVE DESTINATION
"
${
LIB_INSTALL_DIR
}
"
)
install
(
TARGETS capnp
${
INSTALL_TARGETS_DEFAULT_ARGS
}
)
install
(
FILES
${
capnp_headers
}
${
capnp_schemas
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/capnp"
)
set
(
capnp-rpc_sources
...
...
@@ -91,7 +91,7 @@ set(capnp-rpc_schemas
if
(
NOT CAPNP_LITE
)
add_library
(
capnp-rpc
${
capnp-rpc_sources
}
)
target_link_libraries
(
capnp-rpc kj-async kj
)
install
(
TARGETS capnp-rpc
EXPORT CapnProtoTargets ARCHIVE DESTINATION
"
${
LIB_INSTALL_DIR
}
"
)
install
(
TARGETS capnp-rpc
${
INSTALL_TARGETS_DEFAULT_ARGS
}
)
install
(
FILES
${
capnp-rpc_headers
}
${
capnp-rpc_schemas
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/capnp"
)
endif
()
...
...
@@ -111,7 +111,7 @@ set(capnp-json_schemas
if
(
NOT CAPNP_LITE
)
add_library
(
capnp-json
${
capnp-json_sources
}
)
target_link_libraries
(
capnp-json capnp kj-async kj
)
install
(
TARGETS capnp-json
EXPORT CapnProtoTargets ARCHIVE DESTINATION
"
${
LIB_INSTALL_DIR
}
"
)
install
(
TARGETS capnp-json
${
INSTALL_TARGETS_DEFAULT_ARGS
}
)
install
(
FILES
${
capnp-json_headers
}
${
capnp-json_schemas
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/capnp/compat"
)
endif
()
...
...
@@ -132,7 +132,7 @@ set(capnpc_sources
if
(
NOT CAPNP_LITE
)
add_library
(
capnpc
${
capnpc_sources
}
)
target_link_libraries
(
capnpc capnp kj
)
install
(
TARGETS capnpc
EXPORT CapnProtoTargets ARCHIVE DESTINATION
"
${
LIB_INSTALL_DIR
}
"
)
install
(
TARGETS capnpc
${
INSTALL_TARGETS_DEFAULT_ARGS
}
)
install
(
FILES
${
capnpc_headers
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/capnp"
)
endif
()
...
...
@@ -156,7 +156,7 @@ if(BUILD_TOOLS AND NOT CAPNP_LITE)
target_link_libraries
(
capnpc_capnp capnp kj
)
set_target_properties
(
capnpc_capnp PROPERTIES OUTPUT_NAME capnpc-capnp
)
install
(
TARGETS capnp_tool capnpc_cpp capnpc_capnp
EXPORT CapnProtoTargets RUNTIME DESTINATION
"
${
BIN_INSTALL_DIR
}
"
)
install
(
TARGETS capnp_tool capnpc_cpp capnpc_capnp
${
INSTALL_TARGETS_DEFAULT_ARGS
}
)
# Symlink capnpc -> capnp
install
(
CODE
"execute_process(COMMAND
\"
${
CMAKE_COMMAND
}
\"
-E create_symlink capnp
\"\$
ENV{DESTDIR}
${
BIN_INSTALL_DIR
}
/capnpc
\"
)"
)
...
...
c++/src/kj/CMakeLists.txt
View file @
7ca97fc0
...
...
@@ -64,7 +64,7 @@ endif()
target_compile_definitions
(
kj PUBLIC
${
CAPNP_LITE_FLAG
}
)
#make sure external consumers don't need to manually set the include dirs
target_include_directories
(
kj INTERFACE $<INSTALL_INTERFACE:include>
)
install
(
TARGETS kj
EXPORT CapnProtoTargets ARCHIVE DESTINATION
"
${
LIB_INSTALL_DIR
}
"
)
install
(
TARGETS kj
${
INSTALL_TARGETS_DEFAULT_ARGS
}
)
install
(
FILES
${
kj_headers
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/kj"
)
install
(
FILES
${
kj-parse_headers
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/kj/parse"
)
install
(
FILES
${
kj-std_headers
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/kj/std"
)
...
...
@@ -80,7 +80,7 @@ set(kj-test-compat_headers
)
add_library
(
kj-test
${
kj-test_sources
}
)
target_link_libraries
(
kj-test kj
)
install
(
TARGETS kj-test
EXPORT CapnProtoTargets ARCHIVE DESTINATION
"
${
LIB_INSTALL_DIR
}
"
)
install
(
TARGETS kj-test
${
INSTALL_TARGETS_DEFAULT_ARGS
}
)
install
(
FILES
${
kj-test_headers
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/kj"
)
install
(
FILES
${
kj-test-compat_headers
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/kj/compat"
)
...
...
@@ -105,7 +105,7 @@ if(NOT CAPNP_LITE)
# external clients of this library need to link to pthreads
target_compile_options
(
kj-async INTERFACE
"-pthread"
)
endif
()
install
(
TARGETS kj-async
EXPORT CapnProtoTargets ARCHIVE DESTINATION
"
${
LIB_INSTALL_DIR
}
"
)
install
(
TARGETS kj-async
${
INSTALL_TARGETS_DEFAULT_ARGS
}
)
install
(
FILES
${
kj-async_headers
}
DESTINATION
"
${
INCLUDE_INSTALL_DIR
}
/kj"
)
endif
()
...
...
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