Remove include, lib
Update launch.json to include Linux specific debug config Update CMakeList to compile on Linux
This commit is contained in:
parent
6fc18195fc
commit
10064f31c2
7 changed files with 66 additions and 37 deletions
|
@ -15,17 +15,26 @@ set(SOURCES
|
|||
include_directories(${CMAKE_SOURCE_DIR}/include)
|
||||
link_directories(${CMAKE_SOURCE_DIR}/lib)
|
||||
|
||||
file(GLOB SDL2_LIB "${CMAKE_SOURCE_DIR}/lib/*.lib")
|
||||
file(GLOB LUAJIT_LIB "${CMAKE_SOURCE_DIR}/lib/*.lib")
|
||||
|
||||
add_executable(engine ${SOURCES})
|
||||
|
||||
if(WIN32)
|
||||
file(GLOB SDL2_LIB "${CMAKE_SOURCE_DIR}/lib/*.lib")
|
||||
file(GLOB LUAJIT_LIB "${CMAKE_SOURCE_DIR}/lib/*.lib")
|
||||
|
||||
target_link_libraries(engine
|
||||
${SDL2_LIB}
|
||||
${CMAKE_SOURCE_DIR}/lib/luajit.lib
|
||||
)
|
||||
elseif(UNIX)
|
||||
include_directories(${SDL2_INCLUDE_DIRS} ${LUAJIT_INCLUDE_DIRS})
|
||||
link_directories(${SDL2_LIBRARY_DIRS} ${LUAJIT_LIBRARY_DIRS})
|
||||
|
||||
target_link_libraries(engine
|
||||
${SDL2_LIBRARIES}
|
||||
${LUAJIT_LIBRARIES}
|
||||
luajit
|
||||
dl # just in case LuaJIT needs dynamic linking
|
||||
m # math lib, commonly needed
|
||||
)
|
||||
endif()
|
||||
|
||||
# Link all required libraries
|
||||
target_link_libraries(engine
|
||||
${SDL2_LIB}
|
||||
${CMAKE_SOURCE_DIR}/lib/luajit.lib
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue