From 5c81d48c70e62e11d9a8fd0fd8231fac10c3bf29 Mon Sep 17 00:00:00 2001 From: Immanuel Haffner Date: Wed, 27 Nov 2019 02:20:59 +0100 Subject: Collect all object files from the object libraries in a CMake variable (#2477) using the `$` syntax. Use this variable when adding `libbinaryen` as static or shared library. Additionally, use the variable with the object files to simplify the `TARGET_LINK_LIBRARIES` commands: add the object libraries to the sources of executables and drop the use of our libraries in `TARGET_LINK_LIBRARIES`. (Object libraries cannot be linked but must be used as sources. See https://cmake.org/pipermail/cmake/2018-June/067721.html) --- src/asmjs/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/asmjs') diff --git a/src/asmjs/CMakeLists.txt b/src/asmjs/CMakeLists.txt index 0252ed911..e9fa3d12f 100644 --- a/src/asmjs/CMakeLists.txt +++ b/src/asmjs/CMakeLists.txt @@ -3,4 +3,4 @@ SET(asmjs_SOURCES asmangle.cpp shared-constants.cpp ) -ADD_LIBRARY(asmjs STATIC ${asmjs_SOURCES}) \ No newline at end of file +ADD_LIBRARY(asmjs OBJECT ${asmjs_SOURCES}) -- cgit v1.2.3