-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,196 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
deleted file mode 100644 | ||
index 963d2714..00000000 | ||
--- a/CMakeLists.txt | ||
+++ /dev/null | ||
@@ -1,79 +0,0 @@ | ||
-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) | ||
-project(3dstool) | ||
-if(MSVC_VERSION EQUAL 1700 AND MSVC_IDE) | ||
- set(CMAKE_GENERATOR_TOOLSET "v110_xp" CACHE STRING "Name of generator toolset." FORCE) | ||
-endif() | ||
-if(MSVC_VERSION EQUAL 1800 AND MSVC_IDE) | ||
- set(CMAKE_GENERATOR_TOOLSET "v120_xp" CACHE STRING "Name of generator toolset." FORCE) | ||
-endif() | ||
-if(MSVC_VERSION EQUAL 1900 AND MSVC_IDE) | ||
- set(CMAKE_GENERATOR_TOOLSET "v140_xp" CACHE STRING "Name of generator toolset." FORCE) | ||
-endif() | ||
-if(MSVC_VERSION GREATER 1909 AND MSVC_VERSION LESS 1920 AND MSVC_IDE) | ||
- set(CMAKE_GENERATOR_TOOLSET "v141_xp" CACHE STRING "Name of generator toolset." FORCE) | ||
-endif() | ||
-if(MSVC_VERSION GREATER 1600 AND NOT MSVC_IDE) | ||
- if(CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE,5.02") | ||
- else() | ||
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE,5.01") | ||
- endif() | ||
-endif() | ||
-if(APPLE) | ||
- set(CMAKE_MACOSX_RPATH 1) | ||
-endif() | ||
-set(_3DSTOOL_MAJOR 1) | ||
-set(_3DSTOOL_MINOR 2) | ||
-set(_3DSTOOL_PATCHLEVEL 6) | ||
-if(NOT MSVC_IDE AND NOT XCODE_VERSION AND NOT CMAKE_BUILD_TYPE) | ||
- set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE) | ||
-endif() | ||
-option(BUILD64 "Build x86_64(unix only)" ON) | ||
-if(MSVC OR APPLE OR (NOT CYGWIN AND NOT MINGW)) | ||
- option(USE_DEP "Use prebuilt dep" ON) | ||
-endif() | ||
-set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}") | ||
-set(ROOT_SOURCE_DIR "${PROJECT_SOURCE_DIR}") | ||
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${ROOT_SOURCE_DIR}/cmake") | ||
-include(AddCompilationFlags) | ||
-include(AddDep) | ||
-include(AddTarget) | ||
-include(AutoFiles) | ||
-ADD_COMPILATION_FLAGS() | ||
-if(USE_DEP) | ||
- ADD_DEP_INCLUDE_DIR("${ROOT_SOURCE_DIR}/dep") | ||
- ADD_DEP_LIBRARY_DIR("${ROOT_SOURCE_DIR}/dep") | ||
-endif() | ||
-if(UNIX OR MINGW) | ||
- if(CYGWIN) | ||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") | ||
- else() | ||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
- if(NOT APPLE) | ||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++") | ||
- endif() | ||
- endif() | ||
- if((UNIX AND BUILD64) OR (MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 8)) | ||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") | ||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") | ||
- else() | ||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") | ||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") | ||
- endif() | ||
-endif() | ||
-if(MSVC_IDE OR XCODE_VERSION) | ||
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin") | ||
-else() | ||
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin/${CMAKE_BUILD_TYPE}") | ||
-endif() | ||
-add_definitions(-D_3DSTOOL_VERSION="${_3DSTOOL_MAJOR}.${_3DSTOOL_MINOR}.${_3DSTOOL_PATCHLEVEL}") | ||
-if(WIN32) | ||
- add_definitions(-D_CRT_SECURE_NO_WARNINGS) | ||
-endif() | ||
-if(UNIX OR MINGW) | ||
- add_definitions(-D_FILE_OFFSET_BITS=64) | ||
- add_definitions(-Wno-multichar -Wno-shift-overflow -Wno-unused-result) | ||
- set(CMAKE_INSTALL_RPATH .) | ||
- set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) | ||
-endif() | ||
-add_subdirectory(src) | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
deleted file mode 100644 | ||
index 23a33253..00000000 | ||
--- a/src/CMakeLists.txt | ||
+++ /dev/null | ||
@@ -1,46 +0,0 @@ | ||
-AUTO_FILES("." "src" "\\.(cpp|h)$") | ||
-if(MSVC_VERSION LESS 1600) | ||
- AUTO_FILES("${ROOT_SOURCE_DIR}/dep/src/capstone/msvc" "src" "\\.h$") | ||
-endif() | ||
-AUTO_FILES("${ROOT_SOURCE_DIR}/dep/src/capstone-3.0.5/include" "src" "\\.h$") | ||
-AUTO_FILES("${ROOT_SOURCE_DIR}/dep/src/capstone-3.0.5" "src" "capstone-3.0.5/[^/]+\\.(c|h)$") | ||
-AUTO_FILES("${ROOT_SOURCE_DIR}/dep/src/capstone-3.0.5/arch/ARM" "src" "\\.(c|h|inc)$") | ||
-include_directories(${DEP_INCLUDE_DIR} "${ROOT_SOURCE_DIR}/dep/src/capstone-3.0.5/include") | ||
-if(MSVC_VERSION LESS 1600) | ||
- include_directories("${ROOT_SOURCE_DIR}/dep/src/capstone/msvc") | ||
-endif() | ||
-link_directories(${DEP_LIBRARY_DIR}) | ||
-add_definitions(-DSDW_MAIN -DCURL_STATICLIB -DCAPSTONE_USE_SYS_DYN_MEM -DCAPSTONE_HAS_ARM) | ||
-if(APPLE) | ||
- add_definitions(-DSDW_XCONVERT) | ||
-endif() | ||
-ADD_EXE(3dstool "${src}") | ||
-if(WIN32) | ||
- if(MSVC) | ||
- if(MSVC_VERSION LESS 1800) | ||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4005") | ||
- endif() | ||
- target_link_libraries(3dstool libcurl libcrypto WS2_32 Wldap32 Crypt32) | ||
- set(3dstool_LINK_FLAGS_DEBUG "${3dstool_LINK_FLAGS_DEBUG} /NODEFAULTLIB:LIBCMT") | ||
- if(MSVC_VERSION GREATER 1700) | ||
- set(3dstool_LINK_FLAGS_DEBUG "${3dstool_LINK_FLAGS_DEBUG} /IGNORE:4099") | ||
- set(3dstool_LINK_FLAGS_RELWITHDEBINFO "${3dstool_LINK_FLAGS_RELWITHDEBINFO} /IGNORE:4099") | ||
- endif() | ||
- set_target_properties(3dstool PROPERTIES | ||
- LINK_FLAGS_DEBUG "${3dstool_LINK_FLAGS_DEBUG}" | ||
- LINK_FLAGS_RELWITHDEBINFO "${3dstool_LINK_FLAGS_RELWITHDEBINFO}") | ||
- else() | ||
- target_link_libraries(3dstool curl crypto) | ||
- endif() | ||
-else() | ||
- target_link_libraries(3dstool curl ssl crypto) | ||
- if(APPLE) | ||
- target_link_libraries(3dstool ldap) | ||
- else() | ||
- target_link_libraries(3dstool pthread dl) | ||
- endif() | ||
- if(APPLE OR CYGWIN) | ||
- target_link_libraries(3dstool iconv) | ||
- endif() | ||
-endif() | ||
-install(TARGETS 3dstool DESTINATION bin) | ||
diff --git a/src/utility.cpp b/src/utility.cpp | ||
index 7e341c06..ec84ca10 100644 | ||
--- a/src/utility.cpp | ||
+++ b/src/utility.cpp | ||
@@ -113,7 +113,7 @@ void PadFile(FILE* a_fpFile, n64 a_nPadSize, u8 a_uPadData) | ||
#if defined(SDW_MAIN) | ||
extern int UMain(int argc, UChar* argv[]); | ||
|
||
-int main(int argc, char* argv[]) | ||
+int main_3dstool(int argc, char* argv[]) | ||
{ | ||
SetLocale(); | ||
int nArgc = 0; |
Oops, something went wrong.