diff options
author | Derek Schuff <dschuff@chromium.org> | 2022-12-02 14:50:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 14:50:12 -0800 |
commit | 4c79085f1bc6dbf2a186af349e7a00673ecf574c (patch) | |
tree | fb40bbdc8afa1fd9f55c1bc231c98bcbb86d6175 | |
parent | 6658a66e6330f25105f0dca7241e520cffb8c3eb (diff) | |
download | binaryen-4c79085f1bc6dbf2a186af349e7a00673ecf574c.tar.gz binaryen-4c79085f1bc6dbf2a186af349e7a00673ecf574c.tar.bz2 binaryen-4c79085f1bc6dbf2a186af349e7a00673ecf574c.zip |
Rename BYN_INSTALL_TOOLS_ONLY to INSTALL_LIBS (NFC) (#5318)
This better reflects what it really means. Also declare it with option()
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c7d6c266d..b2fc00c04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,9 @@ option(BUILD_TESTS "Build GTest-based tests" ON) # Turn this off to build only the library. option(BUILD_TOOLS "Build tools" ON) +# Turn this off to install only tools and not static/dynamic libs +option(INSTALL_LIBS "Install libraries" ON) + # Turn this on to build binaryen.js as ES5, with additional compatibility configuration for js_of_ocaml. option(JS_OF_OCAML "Build binaryen.js for js_of_ocaml" OFF) @@ -381,13 +384,13 @@ else() add_library(binaryen SHARED ${binaryen_SOURCES} ${binaryen_objs}) endif() target_link_libraries(binaryen ${CMAKE_THREAD_LIBS_INIT}) -if(NOT (BUILD_STATIC_LIB AND BYN_INSTALL_TOOLS_ONLY)) +if(INSTALL_LIBS OR NOT BUILD_STATIC_LIB) install(TARGETS binaryen RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -if(NOT BYN_INSTALL_TOOLS_ONLY) +if(INSTALL_LIBS) install(FILES src/binaryen-c.h src/wasm-delegations.def DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) endif() |