summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e8424184..853acc3ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -170,10 +170,10 @@ INSTALL(FILES src/binaryen-c.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
# if binaryen.js and wasm.js were built (using "./build-js.sh", currently
# optional), install them
-IF(EXISTS "${CMAKE_SOURCE_DIR}/bin/binaryen.js")
+IF(EXISTS "${PROJECT_SOURCE_DIR}/bin/binaryen.js")
INSTALL(FILES bin/binaryen.js DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
ENDIF()
-IF(EXISTS "${CMAKE_SOURCE_DIR}/bin/wasm.js")
+IF(EXISTS "${PROJECT_SOURCE_DIR}/bin/wasm.js")
INSTALL(FILES bin/wasm.js DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
ENDIF()