Skip to content

Commit

Permalink
cmake: fix possible LUA_LIBRARIES variable loss, when CMAKE_BUILD_TYP…
Browse files Browse the repository at this point in the history
…E already set(second and next CMake re-runs)
  • Loading branch information
a1batross committed Sep 6, 2018
1 parent f69af7d commit b6ebc6f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17")
#set(CMAKE_CXX_STANDARD_REQUIRED ON)
#set(CMAKE_CXX_EXTENSIONS OFF)

set(LUA_LIBRARIES luajit)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
set(LUA_LIBRARIES luajit)
elseif(${CMAKE_BUILD_TYPE} STREQUAL "RELWITHDEBINFO")
set(LUA_LIBRARIES luajit)
elseif(${CMAKE_BUILD_TYPE} STREQUAL "DEBUG")
set(LUA_LIBRARIES luajit-debug)
endif()
Expand Down

0 comments on commit b6ebc6f

Please sign in to comment.