diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-12-10 07:22:22 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-12-10 07:22:22 +0100 |
commit | aa61bbe9e414648399aff2802df5b587dee1a084 (patch) | |
tree | ff7809bea445bb76c9fd27a3245e1b2cb7c72596 /mmc_updater/CMakeLists.txt | |
parent | 3f5c46a1c4b27e82976e0067e4ec2d6abfffd9ba (diff) | |
parent | 712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d (diff) | |
download | PrismLauncher-aa61bbe9e414648399aff2802df5b587dee1a084.tar.gz PrismLauncher-aa61bbe9e414648399aff2802df5b587dee1a084.tar.bz2 PrismLauncher-aa61bbe9e414648399aff2802df5b587dee1a084.zip |
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into develop
Conflicts:
CMakeLists.txt
gui/MainWindow.cpp
Diffstat (limited to 'mmc_updater/CMakeLists.txt')
-rw-r--r-- | mmc_updater/CMakeLists.txt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/mmc_updater/CMakeLists.txt b/mmc_updater/CMakeLists.txt new file mode 100644 index 00000000..61c8cd09 --- /dev/null +++ b/mmc_updater/CMakeLists.txt @@ -0,0 +1,44 @@ +project(updater) + +cmake_minimum_required(VERSION 2.6) +enable_testing() +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") + +include_directories(depends) + +if (WIN32) + include_directories(depends/win32cpp) + + if(MSVC) + # - Link the updater binary statically with the Visual C++ runtime + # so that the executable can function standalone. + # - Enable PDB generation for release builds + set(CMAKE_CXX_FLAGS_DEBUG "/MT") + set(CMAKE_C_FLAGS_DEBUG "/MT") + + set(CMAKE_CXX_FLAGS_RELEASE "/MT /Zi /O2 /Ob2 /D NDEBUG") + set(CMAKE_C_FLAGS_RELEASE "/MT /Zi /O2 /Ob2 /D NDEBUG") + remove_definitions(-DUNICODE -D_UNICODE) + endif() +else() + # optimize for reduced code size + set(CMAKE_CXX_FLAGS_RELEASE "-Os") + set(CMAKE_C_FLAGS_RELEASE "-Os") +endif() + +if (APPLE) + # Build the updater as a dual 32/64bit binary. If only one architecture + # is required, removing the other architecture will reduce the size + # of the updater binary + set(CMAKE_OSX_ARCHITECTURES i386;x86_64) + + # Build the updater so that it works on OS X 10.5 and above. + set(MIN_OSX_VERSION 10.5) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${MIN_OSX_VERSION}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${MIN_OSX_VERSION}") +endif() + +add_subdirectory(src) +add_subdirectory(depends/AnyOption) +add_subdirectory(depends/tinyxml) + |