diff --git a/build.bat b/build.bat index 8ca02ab86f..e9753c5be3 100644 --- a/build.bat +++ b/build.bat @@ -166,9 +166,11 @@ if %build_deps% == 1 ( echo building opencc. pushd deps\opencc + powershell -c "$Content = Get-Content -Path CMakeLists.txt; if ($Content[212] -match 'find_library\(LIBMARISA NAMES marisa\)') { $Content[212] = ' find_package(marisa)', ' set(LIBMARISA marisa)' } ; Set-Content -Value $Content -Path CMakeLists.txt" cmake . -B%build_dir% %deps_cmake_flags%^ -DBUILD_TESTING=OFF^ - -DUSE_SYSTEM_MARISA=ON + -DUSE_SYSTEM_MARISA=ON^ + -Dmarisa_DIR="%RIME_ROOT%\lib\cmake\marisa" if errorlevel 1 goto error cmake --build %build_dir% --config %build_config% --target install if errorlevel 1 goto error diff --git a/cmake/cxx_flag_overrides.cmake b/cmake/cxx_flag_overrides.cmake index aef3800a46..9f4fc5d4ca 100644 --- a/cmake/cxx_flag_overrides.cmake +++ b/cmake/cxx_flag_overrides.cmake @@ -10,8 +10,4 @@ if(WIN32) else() set(CMAKE_CXX_FLAGS_RELEASE_INIT "-D_MT -O3 -DNDEBUG") endif() - if(NOT MINGW) - include_directories("$ENV{RIME_ROOT}\\inclide") - link_directories("$ENV{RIME_ROOT}\\lib") - endif() endif()