summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/tolua++/CMakeLists.txt6
-rw-r--r--src/CMakeLists.txt21
2 files changed, 20 insertions, 7 deletions
diff --git a/lib/tolua++/CMakeLists.txt b/lib/tolua++/CMakeLists.txt
index 877b89076..9a84c05b2 100644
--- a/lib/tolua++/CMakeLists.txt
+++ b/lib/tolua++/CMakeLists.txt
@@ -18,4 +18,8 @@ add_executable(tolua ${BIN_SOURCE})
add_library(tolualib ${LIB_SOURCE})
#m is the standard math librarys
-target_link_libraries(tolua lua m tolualib)
+if(UNIX)
+target_link_libraries(m)
+endif()
+
+target_link_libraries(tolua lua tolualib)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 847ca59d5..4f70519bf 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -28,7 +28,8 @@ function(includefolder PATH)
"${PATH}/*.cpp"
"${PATH}/*.h"
)
- source_group("Source Files\\${PATH}" FILES ${FOLDER_FILES})
+ source_group("${PATH}" FILES ${FOLDER_FILES})
+
endfunction(includefolder)
foreach(folder ${FOLDERS})
@@ -37,16 +38,24 @@ endforeach(folder)
file(GLOB_RECURSE SOURCE
"*.cpp"
+ "*.h"
)
+source_group("" FILES ${SOURCE})
endif()
list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/StackWalker.cpp" "${PROJECT_SOURCE_DIR}/LeakFinder.cpp")
-add_executable(../MCServer/MCServer ${SOURCE})
+if(UNIX)
+ set(EXECUTABLE ../MCServer/MCServer)
+else()
+ set(EXECUTABLE MCServer)
+endif()
+
+add_executable(${EXECUTABLE} ${SOURCE})
-target_link_libraries(../MCServer/MCServer OSSupport HTTPServer iniFile Bindings Items Blocks)
-target_link_libraries(../MCServer/MCServer Protocol Generating WorldStorage jsoncpp cryptopp)
-target_link_libraries(../MCServer/MCServer Mobs Entities Simulator UI zlib lua BlockEntities)
-target_link_libraries(../MCServer/MCServer md5 luaexpat)
+target_link_libraries(${EXECUTABLE} OSSupport HTTPServer iniFile Bindings Items Blocks)
+target_link_libraries(${EXECUTABLE} Protocol Generating WorldStorage jsoncpp cryptopp)
+target_link_libraries(${EXECUTABLE} Mobs Entities Simulator UI zlib lua BlockEntities)
+target_link_libraries(${EXECUTABLE} md5 luaexpat)