summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Enders <84310577289916ceefd4132143fb36b63a5f0c71>2022-06-22 02:22:27 -0400
committerSteph Enders <smenders@gmail.com>2022-06-21 22:28:30 -0400
commit485f959f990914d66ef3bb6ec2a8eb746256ff42 (patch)
tree24ab19f61e71e99c74f1d0a61e121c6699836a2c
parenta878cdc42bf41355758dabd353d521d4b12e73fc (diff)
static compile windows dependencies
-rw-r--r--CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c1902a0..41c9885 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.16)
project(dng
VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 20)
+if (WIN32)
+ set(CMAKE_CXX_FLAGS -static)
+endif()
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-${PROJECT_VERSION})
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS ON)
@@ -79,6 +82,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC ${SFML_LIBRARIES} ${LUA_LIBRARIES})
if (UNIX)
set(SFML_INSTALL_PKGCONFIG_FILES FALSE)
endif ()
+
install(TARGETS ${PROJECT_NAME} DESTINATION .)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res DESTINATION .)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/maps DESTINATION .)
@@ -88,10 +92,11 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/thirdparty-licenses.txt DES
# Package Directives
-set(CPACK_GEN TGZ)
if (WIN32)
set(CPACK_GEN ZIP)
-endif ()
+else()
+ set(CPACK_GEN TGZ)
+endif()
set(CPACK_GENERATOR ${CPACK_GEN})
set(CPACK_SOURCE_GENERATOR ${CPACK_GEN})