Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
MuggleWei committed Sep 4, 2023
2 parents 7490840 + bc1a538 commit 6785959
Show file tree
Hide file tree
Showing 4 changed files with 666 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL GNU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -Wall -Wextra")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra")
elseif (${CMAKE_C_COMPILER_ID} MATCHES Clang)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -Wall -Wextra -Wno-missing-field-initializers")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra -Wno-missing-field-initializers")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-missing-field-initializers")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-missing-field-initializers")
elseif (${CMAKE_C_COMPILER_ID} STREQUAL MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1 -D_UNICODE -DUNICODE)
endif()
Expand Down
11 changes: 10 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ if [ $build_mugglec -eq 1 ]; then
fi
cd $mugglec_build_dir

# patch for mac
if [[ "$OSTYPE" == "darwin"* ]]; then
cp $origin_dir/patch_scripts/mugglec_cmakelist.txt $mugglec_src_dir/CMakeLists.txt
fi

cmake \
-S $mugglec_src_dir -B $mugglec_build_dir \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
Expand Down Expand Up @@ -160,5 +165,9 @@ cmake --build $build_dir --target install

# package
cd $install_dir
tar -czvf yoauth.tar.gz bin/yoauth* lib/*.so*
if [[ "$OSTYPE" == "darwin"* ]]; then
tar -czvf yoauth.tar.gz bin/yoauth* lib/*.dylib*
else
tar -czvf yoauth.tar.gz bin/yoauth* lib/*.so*
fi
mv yoauth.tar.gz $pkg_dir
Loading

0 comments on commit 6785959

Please sign in to comment.