Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
X
xxtea-c
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
xxtea-c
Commits
9bda55ed
Commit
9bda55ed
authored
Feb 10, 2016
by
Ma Bingyao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CmakeLists.txt
parent
213a09e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
CmakeLists.txt
CmakeLists.txt
+1
-0
CmakeLists.txt
example/CmakeLists.txt
+9
-3
No files found.
CmakeLists.txt
View file @
9bda55ed
...
@@ -4,6 +4,7 @@ set(CMAKE_MACOSX_RPATH 1)
...
@@ -4,6 +4,7 @@ set(CMAKE_MACOSX_RPATH 1)
set
(
LIBXXTEA_SRC xxtea.c
)
set
(
LIBXXTEA_SRC xxtea.c
)
add_library
(
xxtea SHARED
${
LIBXXTEA_SRC
}
)
add_library
(
xxtea SHARED
${
LIBXXTEA_SRC
}
)
add_library
(
xxtea_static STATIC
${
LIBXXTEA_SRC
}
)
add_library
(
xxtea_static STATIC
${
LIBXXTEA_SRC
}
)
set_target_properties
(
xxtea PROPERTIES VERSION 1.0 SOVERSION 1
)
set_target_properties
(
xxtea_static PROPERTIES OUTPUT_NAME
"xxtea"
)
set_target_properties
(
xxtea_static PROPERTIES OUTPUT_NAME
"xxtea"
)
set_target_properties
(
xxtea PROPERTIES CLEAN_DIRECT_OUTPUT 1
)
set_target_properties
(
xxtea PROPERTIES CLEAN_DIRECT_OUTPUT 1
)
set_target_properties
(
xxtea_static PROPERTIES CLEAN_DIRECT_OUTPUT 1
)
set_target_properties
(
xxtea_static PROPERTIES CLEAN_DIRECT_OUTPUT 1
)
...
...
example/CmakeLists.txt
View file @
9bda55ed
...
@@ -5,7 +5,13 @@ add_executable(main ${DIR_SRCS})
...
@@ -5,7 +5,13 @@ add_executable(main ${DIR_SRCS})
find_path
(
LIBXXTEA_HEADER xxtea.h
)
find_path
(
LIBXXTEA_HEADER xxtea.h
)
include_directories
(
${
LIBXXTEA_HEADER
}
)
include_directories
(
${
LIBXXTEA_HEADER
}
)
find_library
(
find_library
(
LIBXXTEA_LIBRARIES NAMES xxtea
LIBXXTEA_STATIC_LIBRARIES NAMES libxxtea.a
PATHS /usr/lib/ /usr/local/lib/
)
)
target_link_libraries
(
main
${
LIBXXTEA_LIBRARIES
}
)
if
(
LIBXXTEA_STATIC_LIBRARIES
)
target_link_libraries
(
main
${
LIBXXTEA_STATIC_LIBRARIES
}
)
else
(
LIBXXTEA_STATIC_LIBRARIES
)
find_library
(
LIBXXTEA_LIBRARIES NAMES xxtea
)
target_link_libraries
(
main
${
LIBXXTEA_LIBRARIES
}
)
endif
(
LIBXXTEA_STATIC_LIBRARIES
)
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