diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..db2185220 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,42 @@ +project (ygo) + +cmake_minimum_required (VERSION 2.8) + +if(NOT CMAKE_BUILD_TYPE) + message(STATUS "Setting build type to 'Debug' as none was specified.") + set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() + +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/macros") + +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + +include (AutoFiles) + +include (platform/settings) + +if (MSVC) + add_subdirectory (event) + add_subdirectory (freetype) + add_subdirectory (irrlicht) + add_subdirectory (sqlite3) +else () + find_package(LibEvent REQUIRED) + find_package(Freetype REQUIRED) + find_package(Irrlicht REQUIRED) + find_package(Sqlite REQUIRED) + find_package(OpenGL REQUIRED) +endif () + +option(USE_IRRKLANG "Use irrKlang sound library" OFF) +if (USE_IRRKLANG) + set(IRRKLANG_DIR ${CMAKE_SOURCE_DIR}/irrKlang) +endif () + +add_subdirectory (lua) +add_subdirectory (ocgcore) +add_subdirectory (gframe) diff --git a/cmake/compiler/clang-compile.cmake b/cmake/compiler/clang-compile.cmake new file mode 100644 index 000000000..295ef8fd9 --- /dev/null +++ b/cmake/compiler/clang-compile.cmake @@ -0,0 +1 @@ +include (compiler/gcc) diff --git a/cmake/compiler/gcc.cmake b/cmake/compiler/gcc.cmake new file mode 100644 index 000000000..5505443a5 --- /dev/null +++ b/cmake/compiler/gcc.cmake @@ -0,0 +1,4 @@ +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") +set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") +set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG") +add_definitions ( "-Wall" "-fexceptions" "-fomit-frame-pointer" "-fno-strict-aliasing" "-Wno-multichar" ) diff --git a/cmake/compiler/icc.cmake b/cmake/compiler/icc.cmake new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/cmake/compiler/icc.cmake @@ -0,0 +1 @@ + diff --git a/cmake/compiler/mingw.cmake b/cmake/compiler/mingw.cmake new file mode 100644 index 000000000..a354d5854 --- /dev/null +++ b/cmake/compiler/mingw.cmake @@ -0,0 +1 @@ +add_definitions ( "-static-libgcc" "-static-libstdc++" ) diff --git a/cmake/compiler/msvc.cmake b/cmake/compiler/msvc.cmake new file mode 100644 index 000000000..86bd1dad2 --- /dev/null +++ b/cmake/compiler/msvc.cmake @@ -0,0 +1,5 @@ +add_definitions ( "-wd4996" "-D_CRT_SECURE_NO_WARNINGS" "-D_ITERATOR_DEBUG_LEVEL=0" ) +add_definitions ( "-D_UNICODE" "-DUNICODE" "/utf-8" ) + +include (MSVCMultipleProcessCompile) +include (MSVCStaticRuntime) diff --git a/cmake/macros/AutoFiles.cmake b/cmake/macros/AutoFiles.cmake new file mode 100644 index 000000000..d2f205d42 --- /dev/null +++ b/cmake/macros/AutoFiles.cmake @@ -0,0 +1,32 @@ +function (AutoFiles _folder _base _pattern) + if (ARGC GREATER 3) + set(_exclude ${ARGN}) + else () + set(_exclude) + endif () + file (GLOB _files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/ ${_folder}/*) + set (folderFiles) + foreach (_fname ${_files}) + if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_fname}) + AutoFiles ("${_fname}" "${_base}" "${_pattern}" "${_exclude}") + elseif (_fname MATCHES ${_pattern}) + if(_exclude) + if (NOT _fname MATCHES ${_exclude}) + set(folderFiles ${folderFiles} ${_fname}) + endif () + else () + set(folderFiles ${folderFiles} ${_fname}) + endif () + endif () + endforeach () + + string(REPLACE "./" "" _folder2 ${_folder}) + string(REPLACE "/" "\\" _folder2 ${_folder2}) + if (_folder2 STREQUAL ".") + source_group(${_base} FILES ${folderFiles}) + else () + source_group(${_base}\\${_folder2} FILES ${folderFiles}) + endif () + + set(AUTO_FILES_RESULT ${AUTO_FILES_RESULT} ${folderFiles} PARENT_SCOPE) +endfunction () diff --git a/cmake/macros/FindDL.cmake b/cmake/macros/FindDL.cmake new file mode 100644 index 000000000..2f67a798d --- /dev/null +++ b/cmake/macros/FindDL.cmake @@ -0,0 +1,27 @@ +# - Try to find the dl library +# Once done this will define +# +# DL_FOUND - System has libdl +# DL_LIBRARIES - The libraries needed to use libdl +# DL_DEFINITIONS - Compiler switches required for using libdl + +FIND_PATH(DL_INCLUDE_DIR dlfcn.h + PATH_SUFFIXES include + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(DL_LIBRARIES NAMES dl + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(libdl DEFAULT_MSG DL_LIBRARIES DL_INCLUDE_DIR) + +MARK_AS_ADVANCED(DL_INCLUDE_DIR DL_LIBRARIES) diff --git a/cmake/macros/FindFreetype.cmake b/cmake/macros/FindFreetype.cmake new file mode 100644 index 000000000..acd7ab604 --- /dev/null +++ b/cmake/macros/FindFreetype.cmake @@ -0,0 +1,38 @@ +# - Try to find the Lib library +# Once done this will define +# +# FREETYPE_FOUND - System has freetype +# FREETYPE_INCLUDE_DIR - The freetype include directory +# FREETYPE_LIBRARIES - The libraries needed to use freetype +# FREETYPE_DEFINITIONS - Compiler switches required for using freetype + +SET(FREETYPE_DEFINITIONS ${PC_FREETYPE_CFLAGS_OTHER}) + +FIND_PATH(FREETYPE_INCLUDE_DIR ft2build.h + HINTS + ${PC_FREETYPE_INCLUDEDIR} + ${PC_FREETYPE_INCLUDE_DIRS} + PATH_SUFFIXES freetype2 + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(FREETYPE_LIBRARIES NAMES freetype + HINTS + ${PC_FREETYPE_LIBDIR} + ${PC_FREETYPE_LIBRARY_DIRS} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARIES}) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(FREETYPE DEFAULT_MSG FREETYPE_LIBRARIES FREETYPE_INCLUDE_DIR) + +MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR FREETYPE_LIBRARIES) diff --git a/cmake/macros/FindIrrlicht.cmake b/cmake/macros/FindIrrlicht.cmake new file mode 100644 index 000000000..14e0177ec --- /dev/null +++ b/cmake/macros/FindIrrlicht.cmake @@ -0,0 +1,42 @@ +# - Try to find the Lib library +# Once done this will define +# +# IRRLICHT_FOUND - System has IRRLICHT +# IRRLICHT_INCLUDE_DIR - The IRRLICHT include directory +# IRRLICHT_LIBRARIES - The libraries needed to use IRRLICHT +# IRRLICHT_DEFINITIONS - Compiler switches required for using IRRLICHT + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +#FIND_PACKAGE(PkgConfig) +#PKG_SEARCH_MODULE(PC_IRRLICHT Irrlicht) + +SET(IRRLICHT_DEFINITIONS ${PC_IRRLICHT_CFLAGS_OTHER}) + +FIND_PATH(IRRLICHT_INCLUDE_DIR irrlicht.h + HINTS + ${PC_IRRLICHT_INCLUDEDIR} + ${PC_IRRLICHT_INCLUDE_DIRS} + PATH_SUFFIXES include include/irrlicht + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(IRRLICHT_LIBRARIES NAMES Irrlicht irrlicht + HINTS + ${PC_IRRLICHT_LIBDIR} + ${PC_IRRLICHT_LIBRARY_DIRS} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Irrlicht DEFAULT_MSG IRRLICHT_LIBRARIES IRRLICHT_INCLUDE_DIR) + +MARK_AS_ADVANCED(IRRLICHT_INCLUDE_DIR IRRLICHT_LIBRARIES) diff --git a/cmake/macros/FindLibEvent.cmake b/cmake/macros/FindLibEvent.cmake new file mode 100644 index 000000000..d2749c519 --- /dev/null +++ b/cmake/macros/FindLibEvent.cmake @@ -0,0 +1,54 @@ +# - Try to find the Lib library +# Once done this will define +# +# LIBEVENT_FOUND - System has Libevent +# LIBEVENT_INCLUDE_DIR - The Libevent include directory +# LIBEVENT_LIBRARIES - The libraries needed to use Libevent +# LIBEVENT_DEFINITIONS - Compiler switches required for using Libevent + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +#FIND_PACKAGE(PkgConfig) +#PKG_SEARCH_MODULE(PC_LIBEVENT event) + +SET(LIBEVENT_DEFINITIONS ${PC_LIBEVENT_CFLAGS_OTHER}) + +FIND_PATH(LIBEVENT_INCLUDE_DIR event2/event.h + HINTS + ${PC_LIBEVENT_INCLUDEDIR} + ${PC_LIBEVENT_INCLUDE_DIRS} + PATH_SUFFIXES include + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(LIBEVENT_LIBRARIES NAMES event + HINTS + ${PC_LIBEVENT_LIBDIR} + ${PC_LIBEVENT_LIBRARY_DIRS} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(LIBEVENT_LIBRARIES_PTHREADS NAMES event_pthreads + HINTS + ${PC_LIBEVENT_LIBDIR} + ${PC_LIBEVENT_LIBRARY_DIRS} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) +SET(LIBEVENT_LIBRARIES ${LIBEVENT_LIBRARIES} ${LIBEVENT_LIBRARIES_PTHREADS}) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibEvent DEFAULT_MSG LIBEVENT_LIBRARIES LIBEVENT_INCLUDE_DIR) + +MARK_AS_ADVANCED(LIBEVENT_INCLUDE_DIR LIBEVENT_LIBRARIES) diff --git a/cmake/macros/FindSqlite.cmake b/cmake/macros/FindSqlite.cmake new file mode 100644 index 000000000..6d5c8cf09 --- /dev/null +++ b/cmake/macros/FindSqlite.cmake @@ -0,0 +1,38 @@ +# - Try to find the Lib library +# Once done this will define +# +# SQLITE_FOUND - System has sqlite +# SQLITE_INCLUDE_DIR - The sqlite include directory +# SQLITE_LIBRARIES - The libraries needed to use sqlite +# SQLITE_DEFINITIONS - Compiler switches required for using sqlite + +SET(SQLITE_DEFINITIONS ${PC_SQLITE_CFLAGS_OTHER}) + +FIND_PATH(SQLITE_INCLUDE_DIR sqlite3.h + HINTS + ${PC_SQLITE_INCLUDEDIR} + ${PC_SQLITE_INCLUDE_DIRS} + PATH_SUFFIXES include + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +FIND_LIBRARY(SQLITE_LIBRARIES NAMES sqlite3 + HINTS + ${PC_SQLITE_LIBDIR} + ${PC_SQLITE_LIBRARY_DIRS} + PATH_SUFFIXES lib64 lib + PATHS + ~/Library/Frameworks + /Library/Frameworks + /opt/local +) + +SET(SQLITE_LIBRARIES ${SQLITE_LIBRARIES}) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(SQLITE DEFAULT_MSG SQLITE_LIBRARIES SQLITE_INCLUDE_DIR) + +MARK_AS_ADVANCED(SQLITE_INCLUDE_DIR SQLITE_LIBRARIES) diff --git a/cmake/macros/ListCombinations.cmake b/cmake/macros/ListCombinations.cmake new file mode 100644 index 000000000..4321f624a --- /dev/null +++ b/cmake/macros/ListCombinations.cmake @@ -0,0 +1,53 @@ +# - Combine lists of prefixes and suffixes in all combinations +# +# list_combinations(var PREFIXES listitems... SUFFIXES listitems...) - +# where var is the name of your desired output variable and PREFIXES +# and SUFFIXES are special arguments that indicate the start of your +# list of prefixes or suffixes respectively. +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(__list_combinations) + return() +endif() +set(__list_combinations YES) + +function(list_combinations var) + # Parse arguments + set(_prefixes) + set(_suffixes) + set(_nowhere) + set(_curdest _nowhere) + foreach(_element ${ARGN}) + if("${_element}" STREQUAL "PREFIXES") + set(_curdest _prefixes) + elseif("${_element}" STREQUAL "SUFFIXES") + set(_curdest _suffixes) + else() + list(APPEND ${_curdest} "${_element}") + endif() + endforeach() + if(_nowhere) + message(STATUS "_prefixes ${_prefixes}") + message(STATUS "_prefixes ${_suffixes}") + message(STATUS "_prefixes ${_nowhere}") + message(FATAL_ERROR + "Syntax error in use of ${CMAKE_CURRENT_LIST_FILE}") + endif() + + foreach(_prefix ${_prefixes}) + foreach(_suffix ${_suffixes}) + list(APPEND _out "${_prefix}${_suffix}") + endforeach() + endforeach() + + set(${var} "${_out}" PARENT_SCOPE) +endfunction() diff --git a/cmake/macros/MSVCMultipleProcessCompile.cmake b/cmake/macros/MSVCMultipleProcessCompile.cmake new file mode 100644 index 000000000..aad4eabde --- /dev/null +++ b/cmake/macros/MSVCMultipleProcessCompile.cmake @@ -0,0 +1,31 @@ +# - Compile with multiple processes on MSVC +# +# include(MSVCMultipleProcessCompile) +# +# Requires these CMake modules: +# ListCombinations.cmake +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(MSVC AND NOT "${MSVC_VERSION}" LESS 1400) + # Only available in VS 2005 and newer + string(TOUPPER "${CMAKE_CONFIGURATION_TYPES}" _conftypesUC) + include(ListCombinations) + list_combinations(_varnames + PREFIXES + CMAKE_C_FLAGS_ + CMAKE_CXX_FLAGS_ + SUFFIXES + ${_conftypesUC}) + foreach(_var ${_varnames}) + set(${_var} "${${_var}} /MP") + endforeach() +endif() diff --git a/cmake/macros/MSVCStaticRuntime.cmake b/cmake/macros/MSVCStaticRuntime.cmake new file mode 100644 index 000000000..e4ceea6f9 --- /dev/null +++ b/cmake/macros/MSVCStaticRuntime.cmake @@ -0,0 +1,33 @@ +# - Modify compile flags to use the static runtimes of MSVC +# +# include(MSVCStaticRuntime) +# +# Requires these CMake modules: +# ListCombinations.cmake +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +if(MSVC) + string(TOUPPER "${CMAKE_CONFIGURATION_TYPES}" _conftypesUC) + include(ListCombinations) + list_combinations(_varnames + PREFIXES + CMAKE_C_FLAGS_ + CMAKE_CXX_FLAGS_ + SUFFIXES + ${_conftypesUC}) + foreach(_var ${_varnames}) + string(REPLACE "/MDd" "/MTd" ${_var} "${${_var}}") + string(REPLACE "/MD" "/MT" ${_var} "${${_var}}") + endforeach() +endif() + +set(Boost_USE_STATIC_LIBS ON) diff --git a/cmake/platform/apple.cmake b/cmake/platform/apple.cmake new file mode 100644 index 000000000..302f0c074 --- /dev/null +++ b/cmake/platform/apple.cmake @@ -0,0 +1 @@ +add_definitions ( "-DLUA_USE_MACOSX" ) diff --git a/cmake/platform/common.cmake b/cmake/platform/common.cmake new file mode 100644 index 000000000..4cf72c674 --- /dev/null +++ b/cmake/platform/common.cmake @@ -0,0 +1 @@ +add_definitions ( "-DLUA_USE_POSIX" ) diff --git a/cmake/platform/linux.cmake b/cmake/platform/linux.cmake new file mode 100644 index 000000000..5a4931dbf --- /dev/null +++ b/cmake/platform/linux.cmake @@ -0,0 +1 @@ +add_definitions ( "-DLUA_USE_LINUX" ) diff --git a/cmake/platform/settings.cmake b/cmake/platform/settings.cmake new file mode 100644 index 000000000..078feca96 --- /dev/null +++ b/cmake/platform/settings.cmake @@ -0,0 +1,13 @@ +if(CMAKE_SIZEOF_VOID_P MATCHES 8) + set(PLATFORM 64) + MESSAGE(STATUS "Detected 64-bit platform") +else() + set(PLATFORM 32) + MESSAGE(STATUS "Detected 32-bit platform") +endif() + +if(WIN32) + include(platform/win) +elseif(UNIX) + include(platform/unix) +endif() diff --git a/cmake/platform/unix.cmake b/cmake/platform/unix.cmake new file mode 100644 index 000000000..6b28a8aaf --- /dev/null +++ b/cmake/platform/unix.cmake @@ -0,0 +1,21 @@ +if (APPLE) + include (platform/apple) + if ("${CMAKE_GENERATOR}" MATCHES "Xcode") + include (platform/xcode) + endif () +elseif (CMAKE_SYSTEM MATCHES Linux) + include (platform/linux) +else () + include (platform/common) +endif () + +if(CMAKE_C_COMPILER MATCHES "icc") + include(compiler/icc) +elseif(CMAKE_C_COMPILER MATCHES "clang") + include(compiler/clang-compile) +elseif(CMAKE_C_COMPILER MATCHES "cc") + include(compiler/gcc) +endif() + +find_package(Threads) +find_package(DL) diff --git a/cmake/platform/win.cmake b/cmake/platform/win.cmake new file mode 100644 index 000000000..c7c89f0c9 --- /dev/null +++ b/cmake/platform/win.cmake @@ -0,0 +1,10 @@ +if ( MSVC ) + include(compiler/msvc) +elseif ( MINGW ) + if(CMAKE_C_COMPILER MATCHES "clang") + include(compiler/clang) + elseif(CMAKE_C_COMPILER MATCHES "cc") + include(compiler/gcc) + endif() + include(compiler/mingw) +endif() diff --git a/cmake/platform/xcode.cmake b/cmake/platform/xcode.cmake new file mode 100644 index 000000000..3457b91ca --- /dev/null +++ b/cmake/platform/xcode.cmake @@ -0,0 +1,3 @@ +set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0") +set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14") +set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") diff --git a/gframe/CMakeLists.txt b/gframe/CMakeLists.txt new file mode 100644 index 000000000..d79e1d1e3 --- /dev/null +++ b/gframe/CMakeLists.txt @@ -0,0 +1,59 @@ +project (ygopro) + +if (NOT WIN32 AND NOT APPLE) + include (FindX11) +endif () + +add_subdirectory (lzma) + +set (AUTO_FILES_RESULT) +if (MSVC) + AutoFiles("." "res" "\\.(rc)$") + AutoFiles("." "src" "\\.(cpp|c|h)$" "CGUIButton.cpp|lzma/\\.*") +else () + AutoFiles("." "src" "\\.(cpp|c|h)$" "lzma/\\.*") +endif () + +if (MSVC) + add_executable (ygopro WIN32 ${AUTO_FILES_RESULT}) + set_target_properties (ygopro PROPERTIES LINK_FLAGS /ENTRY:"mainCRTStartup") +else () + add_executable (ygopro ${AUTO_FILES_RESULT}) +endif () + +target_link_libraries (ygopro ocgcore lua clzma) + +if (MSVC) + target_link_libraries (ygopro irrlicht freetype sqlite3 event) + include_directories ( "../irrlicht/include" "../freetype/include" "../event/include" "../sqlite3" ) +else () + target_link_libraries (ygopro + ${IRRLICHT_LIBRARIES} + ${FREETYPE_LIBRARIES} + ${SQLITE_LIBRARIES} + ${LIBEVENT_LIBRARIES} + ${OPENGL_gl_LIBRARY} + ) + include_directories ( + ${IRRLICHT_INCLUDE_DIR} + ${FREETYPE_INCLUDE_DIR} + ${SQLITE_INCLUDE_DIRS} + ${LIBEVENT_INCLUDE_DIR} + ${OPENGL_INCLUDE_DIR} + ) + target_link_libraries (ygopro ${CMAKE_THREAD_LIBS_INIT} ${DL_LIBRARIES}) +endif () + +if (USE_IRRKLANG) + add_definitions ( "-DYGOPRO_USE_IRRKLANG" ) + if (MSVC) + target_link_libraries (ygopro ${IRRKLANG_DIR}/lib/Win32-visualStudio/irrKlang.lib) + elseif (CMAKE_SYSTEM MATCHES Linux) + target_link_libraries (ygopro ${IRRKLANG_DIR}/bin/linux-gcc-64/libIrrKlang.so) + endif () + include_directories ( "${IRRKLANG_DIR}/include" ) +endif () + +if (WIN32) + target_link_libraries (ygopro ws2_32 winmm gdi32 kernel32 user32 imm32 opengl32) +endif () diff --git a/gframe/lzma/CMakeLists.txt b/gframe/lzma/CMakeLists.txt new file mode 100644 index 000000000..9195aca0a --- /dev/null +++ b/gframe/lzma/CMakeLists.txt @@ -0,0 +1,6 @@ +project (clzma) + +set (AUTO_FILES_RESULT) +AutoFiles("." "src" "\\.(cpp|c|h)$") + +add_library (clzma STATIC ${AUTO_FILES_RESULT}) diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt new file mode 100644 index 000000000..41f108e4a --- /dev/null +++ b/lua/CMakeLists.txt @@ -0,0 +1,8 @@ +project (lua) + +set (AUTO_FILES_RESULT) +AutoFiles("." "src" "\\.(cpp|c|h)$" "lua.c|luac.c") + +set_source_files_properties(${AUTO_FILES_RESULT} PROPERTIES LANGUAGE CXX) + +add_library (lua STATIC ${AUTO_FILES_RESULT}) diff --git a/ocgcore b/ocgcore index 3c4fd547c..4382ead10 160000 --- a/ocgcore +++ b/ocgcore @@ -1 +1 @@ -Subproject commit 3c4fd547c47e0e2c73b0b7bcee0c9bd6210476b8 +Subproject commit 4382ead1023b7e3109e9f24e3dbf4ddf61f3e986