diff options
author | madmaxoft <github@xoft.cz> | 2014-01-13 17:15:34 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-01-13 17:15:34 +0100 |
commit | 89e641071e6b292e2dea344fe7806e44f81b2281 (patch) | |
tree | 7220a2d4023792a2c8e9393b9981f8a0b5909ba5 /src/CMakeLists.txt | |
parent | Added a generic .user file for MSVC. (diff) | |
download | cuberite-89e641071e6b292e2dea344fe7806e44f81b2281.tar cuberite-89e641071e6b292e2dea344fe7806e44f81b2281.tar.gz cuberite-89e641071e6b292e2dea344fe7806e44f81b2281.tar.bz2 cuberite-89e641071e6b292e2dea344fe7806e44f81b2281.tar.lz cuberite-89e641071e6b292e2dea344fe7806e44f81b2281.tar.xz cuberite-89e641071e6b292e2dea344fe7806e44f81b2281.tar.zst cuberite-89e641071e6b292e2dea344fe7806e44f81b2281.zip |
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 22c58fca3..be97e540e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -25,6 +25,15 @@ if (NOT MSVC) list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/StackWalker.cpp" "${PROJECT_SOURCE_DIR}/LeakFinder.cpp") + # If building a windows version, but not using MSVC, add the resources directly to the makefile: + if (WIN32) + FILE(GLOB ResourceFiles + "Resources/*.rc" + ) + list(APPEND SOURCE "${ResourceFiles}") + endif() + + else () # Generate the Bindings if they don't exist: @@ -37,12 +46,16 @@ else () ) endif() + # Add all subfolders as solution-folders: + list(APPEND FOLDERS "Resources") function(includefolder PATH) FILE(GLOB FOLDER_FILES "${PATH}/*.cpp" "${PATH}/*.h" + "${PATH}/*.rc" ) source_group("${PATH}" FILES ${FOLDER_FILES}) + message("Files included in folder " ${PATH} ": " "${FOLDER_FILES}") endfunction(includefolder) foreach(folder ${FOLDERS}) @@ -69,9 +82,9 @@ else () SET_SOURCE_FILES_PROPERTIES( "StackWalker.cpp LeakFinder.h" PROPERTIES COMPILE_FLAGS "/Yc\"Globals.h\"" ) + list(APPEND SOURCE "Resources/MCServer.rc") endif() - set(EXECUTABLE MCServer) add_executable(${EXECUTABLE} ${SOURCE}) |