Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wasm-watermarker
Project
Project
Details
Activity
Releases
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
nagayama15
wasm-watermarker
Commits
fb16aa7c
Commit
fb16aa7c
authored
Mar 13, 2019
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use shared lib instead of static lib to avoid link error in Windows
parent
ea02a066
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
binaryen.cmake
cmake/binaryen.cmake
+6
-9
CMakeLists.txt
src/CMakeLists.txt
+6
-0
No files found.
cmake/binaryen.cmake
View file @
fb16aa7c
...
...
@@ -5,7 +5,7 @@ ExternalProject_Add(
INSTALL_COMMAND
""
TEST_COMMAND
""
CMAKE_ARGS
-DBUILD_STATIC_LIB=O
N
-DBUILD_STATIC_LIB=O
FF
-DCMAKE_BUILD_TYPE=Release
)
...
...
@@ -14,17 +14,14 @@ ExternalProject_Get_Property(binaryen binary_dir)
file
(
MAKE_DIRECTORY
${
source_dir
}
/src
)
add_library
(
libbinaryen S
TATIC
IMPORTED
)
add_library
(
libbinaryen S
HARED
IMPORTED
)
add_dependencies
(
libbinaryen binaryen
)
set
(
binaryen_SHARED_LIB
${
binary_dir
}
/bin/libbinaryen
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
set_target_properties
(
libbinaryen
PROPERTIES
IMPORTED_LOCATION
${
binary_dir
}
/lib/libbinaryen.a
IMPORTED_LOCATION
${
binaryen_SHARED_LIB
}
IMPORTED_IMPLIB
${
binary_dir
}
/lib/libbinaryen
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
.a
INTERFACE_INCLUDE_DIRECTORIES
${
source_dir
}
/src
INTERFACE_LINK_LIBRARIES
${
binary_dir
}
/lib/libwasm.a
INTERFACE_LINK_LIBRARIES
${
binary_dir
}
/lib/libir.a
INTERFACE_LINK_LIBRARIES
${
binary_dir
}
/lib/libcfg.a
INTERFACE_LINK_LIBRARIES
${
binary_dir
}
/lib/libpasses.a
INTERFACE_LINK_LIBRARIES
${
binary_dir
}
/lib/libsupport.a
INTERFACE_LINK_LIBRARIES
${
binary_dir
}
/lib/libasmjs.a
)
src/CMakeLists.txt
View file @
fb16aa7c
...
...
@@ -5,3 +5,9 @@ add_executable(kyut
target_link_libraries
(
kyut
libbinaryen
)
add_custom_command
(
TARGET kyut POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E copy_if_different
${
binaryen_SHARED_LIB
}
${
CMAKE_CURRENT_BINARY_DIR
}
)
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