Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
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
brpc
Commits
db241598
Commit
db241598
authored
Mar 20, 2018
by
Jason S Zang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use GNUInstallDirs to determine install destinations for better compatibility
parent
0e758d3c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
15 deletions
+9
-15
CMakeLists.txt
CMakeLists.txt
+3
-1
CMakeLists.txt
src/CMakeLists.txt
+6
-14
No files found.
CMakeLists.txt
View file @
db241598
...
...
@@ -29,6 +29,8 @@ if(WITH_DEBUG_SYMBOLS)
set
(
DEBUG_SYMBOL
"-g"
)
endif
()
include
(
GNUInstallDirs
)
configure_file
(
${
CMAKE_SOURCE_DIR
}
/config.h.in
${
CMAKE_SOURCE_DIR
}
/src/butil/config.h @ONLY
)
set
(
CMAKE_MODULE_PATH
${
PROJECT_SOURCE_DIR
}
/cmake
)
...
...
@@ -337,7 +339,7 @@ file(COPY ${CMAKE_SOURCE_DIR}/src/
PATTERN
"*.hpp"
)
install
(
DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/output/include/
DESTINATION
include
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
FILES_MATCHING
PATTERN
"*.h"
PATTERN
"*.hpp"
...
...
src/CMakeLists.txt
View file @
db241598
...
...
@@ -37,23 +37,15 @@ set(protoc_gen_mcpack_SOURCES
add_executable
(
protoc-gen-mcpack
${
protoc_gen_mcpack_SOURCES
}
)
target_link_libraries
(
protoc-gen-mcpack brpc-shared
)
get_property
(
LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS
)
if
(
"
${
LIB64
}
"
STREQUAL
"TRUE"
)
set
(
LIBSUFFIX 64
)
else
()
set
(
LIBSUFFIX
""
)
endif
()
#install directory
# cmake -DCMAKE_INSTALL_PREFIX=/usr
install
(
TARGETS brpc-shared
RUNTIME DESTINATION
bin
LIBRARY DESTINATION
lib
${
LIBSUFFIX
}
ARCHIVE DESTINATION
lib
${
LIBSUFFIX
}
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
install
(
TARGETS brpc-static
RUNTIME DESTINATION
bin
LIBRARY DESTINATION
lib
${
LIBSUFFIX
}
ARCHIVE DESTINATION
lib
${
LIBSUFFIX
}
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
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