Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
cmake_minimum_required(VERSION 3.2)
project (CHAKRACORE)

# Keep CMake from caching static/shared library
# option. Otherwise, CMake fails to update cached
# references
if(SHARED_LIBRARY_SH)
unset(SHARED_LIBRARY_SH CACHE)
unset(STATIC_LIBRARY_SH CACHE)
unset(STATIC_LIBRARY CACHE)
set(SHARED_LIBRARY 1)
endif()

if(STATIC_LIBRARY_SH)
unset(SHARED_LIBRARY_SH CACHE)
unset(STATIC_LIBRARY_SH CACHE)
unset(SHARED_LIBRARY CACHE)
set(STATIC_LIBRARY 1)
endif()

function(clr_unknown_arch)
if (WIN32)
Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ CMAKE_GEN=
MAKE=make
MULTICORE_BUILD=""
ICU_PATH=""
STATIC_LIBRARY=""
STATIC_LIBRARY="-DSHARED_LIBRARY_SH=1"
WITHOUT_FEATURES=""
CREATE_DEB=0

Expand Down Expand Up @@ -125,7 +125,7 @@ while [[ $# -gt 0 ]]; do
;;

--static)
STATIC_LIBRARY="-DSTATIC_LIBRARY=1"
STATIC_LIBRARY="-DSTATIC_LIBRARY_SH=1"
;;

--without=*)
Expand Down Expand Up @@ -244,7 +244,7 @@ else
mkdir -p $DEB_FOLDER/usr/local/bin
mkdir -p $DEB_FOLDER/DEBIAN
cp $DEB_FOLDER/../ch $DEB_FOLDER/usr/local/bin/
if [[ $STATIC_LIBRARY == "" ]]; then
if [[ $STATIC_LIBRARY == "-DSHARED_LIBRARY_SH=1" ]]; then
cp $DEB_FOLDER/../*.so $DEB_FOLDER/usr/local/bin/
fi
echo -e "Package: ChakraCore"\
Expand Down