cmake: reconfigure based on Makefile, not folder

This way [fxsdk build-*] will reconfigure if CMake fails the first time.
This commit is contained in:
Lephenixnoir 2021-01-22 16:12:06 +01:00
parent e75c6aca59
commit fe36c99f98
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 2 additions and 2 deletions

View File

@ -168,7 +168,7 @@ fxsdk_build() {
fxsdk_build_fx() {
# CMake version; automatically configure
if [[ -e "CMakeLists.txt" ]]; then
if [[ ! -e "build-fx" ]]; then
if [[ ! -e "build-fx/Makefile" ]]; then
cmake -B build-fx \
-DCMAKE_MODULE_PATH="$PREFIX/lib/cmake/fxsdk" \
-DCMAKE_TOOLCHAIN_FILE="$PREFIX/lib/cmake/fxsdk/FX9860G.cmake"
@ -183,7 +183,7 @@ fxsdk_build_fx() {
fxsdk_build_cg() {
# CMake version; automatically configure
if [[ -e "CMakeLists.txt" ]]; then
if [[ ! -e "build-cg" ]]; then
if [[ ! -e "build-cg/Makefile" ]]; then
cmake -B build-cg \
-DCMAKE_MODULE_PATH="$PREFIX/lib/cmake/fxsdk" \
-DCMAKE_TOOLCHAIN_FILE="$PREFIX/lib/cmake/fxsdk/FXCG50.cmake"