Skip to content
Browse files

New CMakeLists.txt Style

With this new CMakeLists.txt, you can compile the whole Open Hexagon
project in a few clicks!
  • Loading branch information...
1 parent 7e90608 commit 9abdef9400516db4cbe2acce0ec4b608cd5c442f @Mischa-Alff Mischa-Alff committed Mar 24, 2013
Showing with 297 additions and 70 deletions.
  1. +4 −0 .gitignore
  2. +293 −70 CMakeLists.txt
View
4 .gitignore
@@ -1,4 +1,8 @@
/lib
+CMakeFiles/
+Makefile
+CMakeCache.*
+cmake_install.cmake
#################
## Eclipse
View
363 CMakeLists.txt
@@ -5,12 +5,6 @@ set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type." FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" CACHE STRING "" FORCE)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/;${CMAKE_MODULE_PATH}")
-set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVUtils/cmake/Modules/")
-set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVUtilsJson/cmake/Modules/")
-set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVMenuSystem/cmake/Modules/")
-set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVLuaWrapper/cmake/Modules/")
-set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVEntitySystem/cmake/Modules/")
-set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/extlibs/SSVStart/cmake/Modules/")
if(SFML_STATIC_LIBS)
set(SFML_STATIC_LIBS TRUE)
@@ -20,7 +14,12 @@ find_package(SFML 2 COMPONENTS audio graphics window system network)
if(SFML_FOUND)
include_directories(${SFML_INCLUDE_DIR})
else()
- set(SFML_ROOT "" CACHE PATH "SFML top-level directory")
+ set(SFML_ROOT "" CACHE PATH "SFML top-level directory" )
+ set(SFML_INCLUDE_DIR "" CACHE STRING "SFML2 include directory" )
+ set(SFML_WINDOW_LIBRARY "" CACHE STRING "SFML2 Window library file" )
+ set(SFML_GRAPHICS_LIBRARY "" CACHE STRING "SFML2 Graphics library file" )
+ set(SFML_NETWORK_LIBRARY "" CACHE STRING "SFML2 Network library file" )
+ set(SFML_AUDIO_LIBRARY "" CACHE STRING "SFML2 Audio library file" )
message("\n-> SFML directory not found. Set SFML_ROOT to SFML's top-level path (containing both \"include\" and \"lib\" directories).")
endif()
@@ -40,84 +39,302 @@ else()
message("\n-> LUA directory not found. Set LUA_ROOT to LUA's top-level path (containing both \"include\" and \"lib\" directories).")
endif()
-find_package(SSVUtils)
-if(SSVUTILS_FOUND)
- include_directories(${SSVUTILS_INCLUDE_DIR})
+##############################################################
+######### BUILD DEPENDENCIES ##############
+##############################################################
+
+# DEPENDENCY : SSVUTILS
+# --> DEPENDS: STL
+
+if(SSVUTILS_BUILD_SHARED_LIB)
+ set(SSVUTILS_LIB_TYPE SHARED)
+else()
+ set(SSVUTILS_LIB_TYPE STATIC)
+endif()
+
+set(SSVUTILS_SRC_DIR "extlibs/SSVUtils/src")
+set(SSVUTILS_INC_DIR "extlibs/SSVUtils/include")
+
+set(
+ SSVUTILS_SOURCES
+ ${SSVUTILS_INC_DIR}/SSVUtils/Delegate/Delegate.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Encryption/Base64.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Encryption/MD5.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Encryption/ObfuscatedValue.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/FileSystem/FileSystem.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Log/Log.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/MemoryManager/MemoryManager.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/MemoryManager/Traits/Traits.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Timeline/Command.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Timeline/Do.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Timeline/Go.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Timeline/Timeline.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Timeline/TimelineManager.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Timeline/Wait.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Utils/Utils.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Utils/UtilsContainers.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Utils/UtilsMath.h
+ ${SSVUTILS_INC_DIR}/SSVUtils/Utils/UtilsString.h
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Encryption/Base64.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Encryption/MD5.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/FileSystem/FileSystem.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Log/Log.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Timeline/Command.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Timeline/Do.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Timeline/Go.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Timeline/Timeline.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Timeline/TimelineManager.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Timeline/Wait.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Utils/Utils.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Utils/UtilsContainers.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Utils/UtilsMath.cpp
+ ${SSVUTILS_SRC_DIR}/SSVUtils/Utils/UtilsString.cpp
+)
+
+include_directories(${SSVUTILS_INC_DIR})
+add_library(SSVUtils ${SSVUTILS_LIB_TYPE} ${SSVUTILS_SOURCES})
+
+if(SSVUTILS_BUILD_SHARED_LIB)
+ set_target_properties(SSVUtils PROPERTIES DEBUG_POSTFIX -d)
else()
- set(SSVUTILS_ROOT "" CACHE PATH "SSVUtils top-level directory")
- message("\n-> SSVUtils directory not found. Set SSVUTILS_ROOT to SSVUtils' top-level path (containing both \"include\" and \"lib\" directories).")
+ set_target_properties(SSVUtils PROPERTIES DEBUG_POSTFIX -s-d)
+ set_target_properties(SSVUtils PROPERTIES RELEASE_POSTFIX -s)
endif()
-find_package(SSVMenuSystem)
-if(SSVMENUSYSTEM_FOUND)
- include_directories(${SSVMENUSYSTEM_INCLUDE_DIR})
+if(SSVUTILS_BUILD_SHARED_LIB)
+ set(SSVUTILS_LIBRARIES ${CMAKE_CURRENT_SOURCE_DIR}/libSSVUtils.a)
+else()
+ set(SSVUTILS_LIBRARIES ${CMAKE_CURRENT_SOURCE_DIR}/libSSVUtils-s.a)
+endif()
+
+message(${SSVUTILS_LIBRARIES})
+
+#DEPENDENCY : SSVUtilsJson
+#--> DEPENDS: SSVUtils jsoncpp
+
+if(SSVUTILSJSON_BUILD_SHARED_LIB)
+ set(SSVUTILSJSON_LIB_TYPE SHARED)
+else()
+ set(SSVUTILSJSON_LIB_TYPE STATIC)
+endif()
+
+set(SSVUTILSJSON_SRC_DIR "extlibs/SSVUtilsJson/src")
+set(SSVUTILSJSON_INC_DIR "extlibs/SSVUtilsJson/include")
+
+set(
+ SSVUTILSJSON_SOURCES
+ ${SSVUTILSJSON_INC_DIR}/SSVUtilsJson/Utils/UtilsJson.h
+ ${SSVUTILSJSON_SRC_DIR}/SSVUtilsJson/Utils/UtilsJson.cpp
+)
+
+include_directories(${SSVUTILSJSON_INC_DIR})
+add_library(SSVUtilsJson ${SSVUTILSJSON_LIB_TYPE} ${SSVUTILSJSON_SOURCES})
+
+target_link_libraries( SSVUtilsJson SSVUtils)
+target_link_libraries( SSVUtilsJson ${JSONCPP_LIBRARIES} )
+
+if(SSVUTILSJSON_BUILD_SHARED_LIB)
+ set_target_properties(SSVUtilsJson PROPERTIES DEBUG_POSTFIX -d)
else()
- set(SSVUTILS_ROOT "" CACHE PATH "SSVUtils top-level directory")
- message("\n-> SSVMenuSystem directory not found. Set SSVMENUSYSTEM_ROOT to SSVMenuSystem's top-level path (containing both \"include\" and \"lib\" directories).")
+ set_target_properties(SSVUtilsJson PROPERTIES DEBUG_POSTFIX -s-d)
+ set_target_properties(SSVUtilsJson PROPERTIES RELEASE_POSTFIX -s)
endif()
-find_package(SSVEntitySystem)
-if(SSVENTITYSYSTEM_FOUND)
- include_directories(${SSVENTITYSYSTEM_INCLUDE_DIR})
+if(SSVUTILSJSON_BUILD_SHARED_LIB)
+ set(SSVUTILSJSON_LIBRARIES ${CMAKE_BINARY_DIR}/libSSVUtilsJson.a)
else()
- set(SSVENTITYSYSTEM_ROOT "" CACHE PATH "SSVEntitySystem top-level directory")
- message("\n-> SSVMenuSystem directory not found. Set SSVENEITYSYSTEM_ROOT to SSVEntitySystem's top-level path (containing both \"include\" and \"lib\" directories).")
+ set(SSVUTILSJSON_LIBRARIES ${CMAKE_BINARY_DIR}/libSSVUtilsJson-s.a)
endif()
-find_package(SSVStart)
-if(SSVSTART_FOUND)
- include_directories(${SSVSTART_INCLUDE_DIR})
+#DEPENDENCY : SSVStart
+#--> DEPENDS: SSVUtils SSVUtilsJson SFML
+
+if(SSVSTART_BUILD_SHARED_LIB)
+ set(SSVSTART_LIB_TYPE SHARED)
else()
- set(SSVSTART_ROOT "" CACHE PATH "SSVStart top-level directory")
- message("\n-> SSVStart directory not found. Set SSVSTART_ROOT to SSVStart's top-level path (containing both \"include\" and \"lib\" directories).")
+ set(SSVSTART_LIB_TYPE STATIC)
endif()
-find_package(SSVLuaWrapper)
-if(SSVLUAWRAPPER_FOUND)
- include_directories(${SSVLUAWRAPPER_INCLUDE_DIR})
+set(SSVSTART_SRC_DIR "extlibs/SSVStart/src")
+set(SSVSTART_INC_DIR "extlibs/SSVStart/include")
+
+set(
+ SSVSTART_SOURCES
+ ${SSVSTART_INC_DIR}/SSVStart/Assets/AssetFolder.h
+ ${SSVSTART_INC_DIR}/SSVStart/Assets/AssetManager.h
+ ${SSVSTART_INC_DIR}/SSVStart/Camera/Camera.h
+ ${SSVSTART_INC_DIR}/SSVStart/GameSystem/GameState.h
+ ${SSVSTART_INC_DIR}/SSVStart/GameSystem/GameWindow.h
+ ${SSVSTART_INC_DIR}/SSVStart/GameSystem/Timers.h
+ ${SSVSTART_INC_DIR}/SSVStart/Input/Combo.h
+ ${SSVSTART_INC_DIR}/SSVStart/Input/Manager.h
+ ${SSVSTART_INC_DIR}/SSVStart/Input/Trigger.h
+ ${SSVSTART_INC_DIR}/SSVStart/Tileset/Tileset.h
+ ${SSVSTART_INC_DIR}/SSVStart/Utils/ThreadWrapper.h
+ ${SSVSTART_INC_DIR}/SSVStart/Utils/Utils.h
+ ${SSVSTART_SRC_DIR}/SSVStart/Assets/AssetFolder.cpp
+ ${SSVSTART_SRC_DIR}/SSVStart/Assets/AssetManager.cpp
+ ${SSVSTART_SRC_DIR}/SSVStart/Camera/Camera.cpp
+ ${SSVSTART_SRC_DIR}/SSVStart/GameSystem/GameState.cpp
+ ${SSVSTART_SRC_DIR}/SSVStart/GameSystem/GameWindow.cpp
+ ${SSVSTART_SRC_DIR}/SSVStart/GameSystem/GWProperties.cpp
+ ${SSVSTART_SRC_DIR}/SSVStart/Input/Combo.cpp
+ ${SSVSTART_SRC_DIR}/SSVStart/Input/Manager.cpp
+ ${SSVSTART_SRC_DIR}/SSVStart/Input/Trigger.cpp
+ ${SSVSTART_SRC_DIR}/SSVStart/Tileset/Tileset.cpp
+ ${SSVSTART_SRC_DIR}/SSVStart/Utils/Utils.cpp
+)
+
+include_directories(${SSVSTART_INC_DIR})
+add_library(SSVStart ${SSVSTART_LIB_TYPE} ${SSVSTART_SOURCES})
+
+target_link_libraries( SSVStart SSVUtils )
+target_link_libraries( SSVStart ${SFML_LIBRARIES} )
+
+if(SSVSTART_BUILD_SHARED_LIB)
+ set_target_properties(SSVStart PROPERTIES DEBUG_POSTFIX -d)
else()
- set(SSVLUAWRAPPER_ROOT "" CACHE PATH "SSVLuaWrapper top-level directory")
- message("\n-> SSVLuaWrapper directory not found. Set SSVLUAWRAPPER_ROOT to SSVLuaWrapper's top-level path (containing both \"include\" and \"lib\" directories).")
+ set_target_properties(SSVStart PROPERTIES DEBUG_POSTFIX -s-d)
+ set_target_properties(SSVStart PROPERTIES RELEASE_POSTFIX -s)
endif()
-find_package(SSVUtilsJson)
-if(SSVUTILSJSON_FOUND)
- include_directories(${SSVUTILSJSON_INCLUDE_DIR})
+if(SSVSTART_BUILD_SHARED_LIB)
+ set(SSVSTART_LIBRARIES ${CMAKE_BINARY_DIR}/libSSVStart.a)
else()
- set(SSVUTILSJSON_ROOT "" CACHE PATH "SSVUtilsJson top-level directory")
- message("\n-> SSVUtilsJson directory not found. Set SSVUTILSJSON_ROOT to SSVUtilsJson's top-level path (containing both \"include\" and \"lib\" directories).")
+ set(SSVSTART_LIBRARIES ${CMAKE_BINARY_DIR}/libSSVStart-s.a)
endif()
-set(SSVUTILS_STATIC_LIBS "" CACHE BOOL "Check to link SSVUtils statically.")
-set(SSVUTILS_INCLUDE_DIR "" CACHE STRING "SSVUtils include directory")
-set(SSVUTILS_LIBRARY "" CACHE STRING "SSVUtils library file")
+#DEPENDENCY : SSVLuaWrapper
+#--> DEPENDS: LUA51
-set(SSVUTILSJSON_STATIC_LIBS "" CACHE BOOL "Check to link SSVUtilsJson statically.")
-set(SSVUTILSJSON_INCLUDE_DIR "" CACHE STRING "SSVUtilsJson include directory")
-set(SSVUTILSJSON_LIBRARY "" CACHE STRING "SSVUtilsJson library file")
+if(SSVLUAWRAPPER_BUILD_SHARED_LIB)
+ set(SSVLUAWRAPPER_LIB_TYPE SHARED)
+else()
+ set(SSVLUAWRAPPER_LIB_TYPE STATIC)
+endif()
-set(SSVSTART_STATIC_LIBS "" CACHE BOOL "Check to link SSVStart statically.")
-set(SSVSTART_INCLUDE_DIR "" CACHE STRING "SSVStart include directory")
-set(SSVSTART_LIBRARY "" CACHE STRING "SSVStart library file")
+set(SSVLUAWRAPPER_SRC_DIR "extlibs/SSVLuaWrapper/src")
+set(SSVLUAWRAPPER_INC_DIR "extlibs/SSVLuaWrapper/include")
-set(SSVLUAWRAPPER_STATIC_LIBS "" CACHE BOOL "Check to link SSVLuaWrapper statically.")
-set(SSVLUAWRAPPER_INCLUDE_DIR "" CACHE STRING "SSVLuaWrapper include directory")
-set(SSVLUAWRAPPER_LIBRARY "" CACHE STRING "SSVLuaWrapper library file")
+set(
+ SSVLUAWRAPPER_SOURCES
+ ${SSVLUAWRAPPER_INC_DIR}/SSVLuaWrapper/LuaContext/LuaContext.h
+ ${SSVLUAWRAPPER_SRC_DIR}/SSVLuaWrapper/LuaContext/LuaContext.cpp
+)
-set(SSVENTITYSYSTEM_STATIC_LIBS "" CACHE BOOL "Check to link SSVEntitySystem statically.")
-set(SSVENTITYSYSTEM_INCLUDE_DIR "" CACHE STRING "SSVEntitySystem include directory")
-set(SSVENTITYSYSTEM_LIBRARY "" CACHE STRING "SSVEntitySystem library file")
+include_directories(${SSVLUAWRAPPER_INC_DIR})
+add_library(SSVLuaWrapper ${SSVLUAWRAPPER_LIB_TYPE} ${SSVLUAWRAPPER_SOURCES})
-set(SSVMENUSYSTEM_STATIC_LIBS "" CACHE BOOL "Check to link SSVMenuSystem statically.")
-set(SSVMENUSYSTEM_INCLUDE_DIR "" CACHE STRING "SSVMenuSystem include directory")
-set(SSVMENUSYSTEM_LIBRARY "" CACHE STRING "SSVMenuSystem library file")
+target_link_libraries(SSVLuaWrapper ${LUA_LIBRARIES})
-set(SFML_INCLUDE_DIR "" CACHE STRING "SFML2 include directory")
-set(SFML_SYSTEM_LIBRARY "" CACHE STRING "SFML2 System library file")
-set(SFML_WINDOW_LIBRARY "" CACHE STRING "SFML2 Window library file")
-set(SFML_GRAPHICS_LIBRARY "" CACHE STRING "SFML2 Graphics library file")
-set(SFML_NETWORK_LIBRARY "" CACHE STRING "SFML2 Network library file")
-set(SFML_AUDIO_LIBRARY "" CACHE STRING "SFML2 Audio library file")
+if(SSVLUAWRAPPER_BUILD_SHARED_LIB)
+ set_target_properties(SSVLuaWrapper PROPERTIES DEBUG_POSTFIX -d)
+else()
+ set_target_properties(SSVLuaWrapper PROPERTIES DEBUG_POSTFIX -s-d)
+ set_target_properties(SSVLuaWrapper PROPERTIES RELEASE_POSTFIX -s)
+endif()
+
+if(SSVSTART_BUILD_SHARED_LIB)
+ set(SSVSTART_LIBRARIES ${CMAKE_BINARY_DIR}/libSSVLuaWrapper.a)
+else()
+ set(SSVSTART_LIBRARIES ${CMAKE_BINARY_DIR}/libSSVLuaWrapper-s.a)
+endif()
+
+#DEPENDENCY : SSVEntitySystem
+#--> DEPENDS: GoogleSparsehash SSVUtils
+
+if(SSVENTITYSYSTEM_BUILD_SHARED_LIB)
+ set(SSVENTITYSYSTEM_LIB_TYPE SHARED)
+else()
+ set(SSVENTITYSYSTEM_LIB_TYPE STATIC)
+endif()
+
+set(SSVENTITYSYSTEM_SRC_DIR "extlibs/SSVEntitySystem/src")
+set(SSVENTITYSYSTEM_INC_DIR "extlibs/SSVEntitySystem/include")
+
+set(
+ SSVENTITYSYSTEM_SOURCES
+ ${SSVENTITYSYSTEM_INC_DIR}/SSVEntitySystem/Core/Component.h
+ ${SSVENTITYSYSTEM_INC_DIR}/SSVEntitySystem/Core/Entity.h
+ ${SSVENTITYSYSTEM_INC_DIR}/SSVEntitySystem/Core/Manager.h
+ ${SSVENTITYSYSTEM_INC_DIR}/SSVEntitySystem/Utils/Repository.h
+ ${SSVENTITYSYSTEM_INC_DIR}/SSVEntitySystem/Utils/Utils.h
+ ${SSVENTITYSYSTEM_SRC_DIR}/SSVEntitySystem/Core/Component.cpp
+ ${SSVENTITYSYSTEM_SRC_DIR}/SSVEntitySystem/Core/Entity.cpp
+ ${SSVENTITYSYSTEM_SRC_DIR}/SSVEntitySystem/Core/Manager.cpp
+ ${SSVENTITYSYSTEM_SRC_DIR}/SSVEntitySystem/Utils/Utils.cpp
+)
+
+include_directories(${SSVENTITYSYSTEM_INC_DIR})
+add_library(SSVEntitySystem ${SSVENTITYSYSTEM_LIB_TYPE} ${SSVENTITYSYSTEM_SOURCES})
+
+target_link_libraries(SSVEntitySystem ${SPARSEHASH_LIBRARIES})
+target_link_libraries(SSVEntitySystem SSVUtils)
+
+if(SSVENTITYSYSTEM_BUILD_SHARED_LIB)
+ set_target_properties(SSVEntitySystem PROPERTIES DEBUG_POSTFIX -d)
+else()
+ set_target_properties(SSVEntitySystem PROPERTIES DEBUG_POSTFIX -s-d)
+ set_target_properties(SSVEntitySystem PROPERTIES RELEASE_POSTFIX -s)
+endif()
+
+if(SSVENTITYSYSTEM_BUILD_SHARED_LIB)
+ set(SSVENTITYSYSTEM_LIBRARIES ${CMAKE_BINARY_DIR}/libSSVEntitySystem.a)
+else()
+ set(SSVENTITYSYSTEM_LIBRARIES ${CMAKE_BINARY_DIR}/libSSVEntitySystem-s.a)
+endif()
+
+
+#DEPENDENCY : SSVMenuSystem
+#--> DEPENDS: GoogleSparsehash SSVUtils
+
+if(SSVMENUSYSTEM_BUILD_SHARED_LIB)
+ set(SSVMENUSYSTEM_LIB_TYPE SHARED)
+else()
+ set(SSVMENUSYSTEM_LIB_TYPE STATIC)
+endif()
+
+set(SSVMENUSYSTEM_SRC_DIR "extlibs/SSVMenuSystem/src")
+set(SSVMENUSYSTEM_INC_DIR "extlibs/SSVMenuSystem/include")
+
+set(
+ SSVMENUSYSTEM_SOURCES
+ ${SSVMENUSYSTEM_INC_DIR}/SSVMenuSystem/Menu/Category.h
+ ${SSVMENUSYSTEM_INC_DIR}/SSVMenuSystem/Menu/ItemBase.h
+ ${SSVMENUSYSTEM_INC_DIR}/SSVMenuSystem/Menu/Menu.h
+ ${SSVMENUSYSTEM_INC_DIR}/SSVMenuSystem/Items/Goto.h
+ ${SSVMENUSYSTEM_INC_DIR}/SSVMenuSystem/Items/Single.h
+ ${SSVMENUSYSTEM_INC_DIR}/SSVMenuSystem/Items/Slider.h
+ ${SSVMENUSYSTEM_INC_DIR}/SSVMenuSystem/Items/Toggle.h
+ ${SSVMENUSYSTEM_SRC_DIR}/SSVMenuSystem/Menu/Category.cpp
+ ${SSVMENUSYSTEM_SRC_DIR}/SSVMenuSystem/Menu/ItemBase.cpp
+ ${SSVMENUSYSTEM_SRC_DIR}/SSVMenuSystem/Menu/Menu.cpp
+ ${SSVMENUSYSTEM_SRC_DIR}/SSVMenuSystem/Items/Goto.cpp
+ ${SSVMENUSYSTEM_SRC_DIR}/SSVMenuSystem/Items/Single.cpp
+ ${SSVMENUSYSTEM_SRC_DIR}/SSVMenuSystem/Items/Slider.cpp
+ ${SSVMENUSYSTEM_SRC_DIR}/SSVMenuSystem/Items/Toggle.cpp
+)
+
+include_directories(${SSVMENUSYSTEM_INC_DIR})
+add_library(SSVMenuSystem ${SSVMENUSYSTEM_LIB_TYPE} ${SSVMENUSYSTEM_SOURCES})
+
+if(SSVMENUSYSTEM_BUILD_SHARED_LIB)
+ set_target_properties(SSVMenuSystem PROPERTIES DEBUG_POSTFIX -d)
+else()
+ set_target_properties(SSVMenuSystem PROPERTIES DEBUG_POSTFIX -s-d)
+ set_target_properties(SSVMenuSystem PROPERTIES RELEASE_POSTFIX -s)
+endif()
+
+if(SSVMENUSYSTEM_BUILD_SHARED_LIB)
+ set(SSVMENUSYSTEM_LIBRARIES ${CMAKE_BINARY_DIR}/libSSVMenuSystem.a)
+else()
+ set(SSVMENUSYSTEM_LIBRARIES ${CMAKE_BINARY_DIR}/libSSVMenuSystem-s.a)
+endif()
+
+
+##############################################################
+######### BUILD OPENHEXAGON ##############
+##############################################################
set(SRC_DIR "src")
set(INC_DIR "include")
@@ -134,7 +351,7 @@ set(
${INC_DIR}/${PROJECT_NAME}/Data/LevelData.h
${INC_DIR}/${PROJECT_NAME}/Data/MusicData.h
${INC_DIR}/${PROJECT_NAME}/Data/PackData.h
- ${INC_DIR}/${PROJECT_NAME}/Data/PatternData.h
+ #${INC_DIR}/${PROJECT_NAME}/Data/PatternData.h
${INC_DIR}/${PROJECT_NAME}/Data/ProfileData.h
${INC_DIR}/${PROJECT_NAME}/Data/StyleData.h
${INC_DIR}/${PROJECT_NAME}/Global/Assets.h
@@ -168,27 +385,28 @@ set(
${SRC_DIR}/${PROJECT_NAME}/Utils/Utils.cpp
)
+include_directories(${INC_DIR})
include_directories(${INC_DIR}/${PROJECT_NAME})
include_directories(${INC_DIR}/${PROJECT_NAME}/Core)
include_directories(${INC_DIR}/${PROJECT_NAME}/Data)
include_directories(${INC_DIR}/${PROJECT_NAME}/Utils)
add_executable(SSVOpenHexagon ${SOURCES})
-target_link_libraries(SSVOpenHexagon ${SSVUTILS_LIBRARIES})
-target_link_libraries(SSVOpenHexagon ${SSVUTILSJSON_LIBRARIES})
-target_link_libraries(SSVOpenHexagon ${SSVSTART_LIBRARIES})
-target_link_libraries(SSVOpenHexagon ${SSVLUAWRAPPER_LIBRARIES})
-target_link_libraries(SSVOpenHexagon ${SSVENTITYSYSTEM_LIBRARIES})
-target_link_libraries(SSVOpenHexagon ${SSVMENUSYSTEM_LIBRARIES})
+target_link_libraries(SSVOpenHexagon SSVUtils)
+target_link_libraries(SSVOpenHexagon SSVUtilsJson)
+target_link_libraries(SSVOpenHexagon SSVStart)
+target_link_libraries(SSVOpenHexagon SSVLuaWrapper)
+target_link_libraries(SSVOpenHexagon SSVEntitySystem)
+target_link_libraries(SSVOpenHexagon SSVMenuSystem)
target_link_libraries(SSVOpenHexagon ${JSONCPP_LIBRARIES})
target_link_libraries(SSVOpenHexagon ${SFML_LIBRARIES})
target_link_libraries(SSVOpenHexagon ${LUA_LIBRARIES})
target_link_libraries(SSVOpenHexagon ${SSVMENUSYSTEM_LIBRARIES})
if(UNIX)
install(TARGETS SSVOpenHexagon
- RUNTIME DESTINATION /usr/local/games/SSVOpenHexagon/
+ RUNTIME DESTINATION /usr/local/games/SSVOpenHexagon/
)
install(DIRECTORY _RELEASE/
@@ -201,5 +419,10 @@ if(UNIX)
)
else(WIN32)
install(TARGETS SSVOpenHexagon
- RUNTIME DESTINATION ./_RELEASE/)
+ RUNTIME DESTINATION .
+ )
+
+ install(DIRECTORY _RELEASE/
+ DESTINATION "C:/Program Files (x86)/SSVOpenHexagon/"
+ )
endif()

0 comments on commit 9abdef9

Please sign in to comment.
Something went wrong with that request. Please try again.