summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69cd9b2..c1902a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,7 @@ project(dng
VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-${PROJECT_VERSION})
+set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS ON)
# Setup Lua Libraries
# To determine which files look at the lua/makefile to see how the targets are built
@@ -42,7 +43,9 @@ add_library(lualib STATIC
${LUA_SRC}/lstrlib.c
${LUA_SRC}/ltablib.c
${LUA_SRC}/lutf8lib.c)
-target_compile_definitions(lualib PRIVATE -DLUA_USE_POSIX=1) # to properly use mkstemp
+if(UNIX)
+ target_compile_definitions(lualib PRIVATE -DLUA_USE_POSIX=1) # to properly use mkstemp
+endif()
target_include_directories(lua PUBLIC lua)
target_include_directories(lauxlib PUBLIC lua)
target_include_directories(lualib PUBLIC lua)
@@ -53,7 +56,9 @@ include_directories(${PROJECT_SOURCE_DIR}/thirdparty/lua)
# System specific includes
if (UNIX)
set(RES_LIB src/linux/res.h)
-endif ()
+elseif(WIN32)
+ set(RES_LIB src/windows/res.h)
+endif()
add_executable(${PROJECT_NAME} src/main.cpp src/Level.cpp src/Level.h src/CApi.h src/Scene.h src/LuaApi.h src/MessageBox.h ${RES_LIB})
target_link_libraries(${PROJECT_NAME} PUBLIC ${LUA_LIBRARIES})
@@ -65,7 +70,6 @@ if (WIN32)
set(SFML_USE_STATIC_STD_LIBS TRUE)
endif ()
set(SFML_USE_SYSTEM_DEPS ON)
-set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS ON)
add_subdirectory(${PROJECT_SOURCE_DIR}/thirdparty/SFML EXCLUDE_FROM_ALL)
target_link_libraries(${PROJECT_NAME} PUBLIC ${SFML_LIBRARIES} ${LUA_LIBRARIES})