Skip to content

Commit b6ebc6f

Browse files
committed
cmake: fix possible LUA_LIBRARIES variable loss, when CMAKE_BUILD_TYPE already set(second and next CMake re-runs)
1 parent f69af7d commit b6ebc6f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17")
1717
#set(CMAKE_CXX_STANDARD_REQUIRED ON)
1818
#set(CMAKE_CXX_EXTENSIONS OFF)
1919

20+
set(LUA_LIBRARIES luajit)
21+
2022
if(NOT CMAKE_BUILD_TYPE)
2123
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
22-
set(LUA_LIBRARIES luajit)
23-
elseif(${CMAKE_BUILD_TYPE} STREQUAL "RELWITHDEBINFO")
24-
set(LUA_LIBRARIES luajit)
2524
elseif(${CMAKE_BUILD_TYPE} STREQUAL "DEBUG")
2625
set(LUA_LIBRARIES luajit-debug)
2726
endif()

0 commit comments

Comments
 (0)