diff options
author | Alexia <alexia@robotbrain.info> | 2016-03-26 11:17:03 -0400 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-03-26 17:01:20 +0100 |
commit | 1854e05e1bb14d8f2bbc4676f44024a83e972f6f (patch) | |
tree | 27a4e918ab0ef62af16b4dbac8ceb869b3965217 | |
parent | 0c06ab364c58a09655c62272605eec9ce611f929 (diff) | |
download | MultiMC-1854e05e1bb14d8f2bbc4676f44024a83e972f6f.tar MultiMC-1854e05e1bb14d8f2bbc4676f44024a83e972f6f.tar.gz MultiMC-1854e05e1bb14d8f2bbc4676f44024a83e972f6f.tar.lz MultiMC-1854e05e1bb14d8f2bbc4676f44024a83e972f6f.tar.xz MultiMC-1854e05e1bb14d8f2bbc4676f44024a83e972f6f.zip |
NOISSUE Fix building when embedded in another project
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4125fa29..9cd3cf47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,20 +79,20 @@ set_directory_properties(PROPERTIES EP_BASE External) # Add quazip add_definitions(-DQUAZIP_STATIC) set(QUAZIP_VERSION "0.7.1") -if(NOT EXISTS ${CMAKE_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz) - file(DOWNLOAD http://downloads.sourceforge.net/project/quazip/quazip/${QUAZIP_VERSION}/quazip-${QUAZIP_VERSION}.tar.gz ${CMAKE_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz) +if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz) + file(DOWNLOAD http://downloads.sourceforge.net/project/quazip/quazip/${QUAZIP_VERSION}/quazip-${QUAZIP_VERSION}.tar.gz ${CMAKE_CURRENT_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz) endif() ExternalProject_Add(QuaZIP SOURCE_DIR <BINARY_DIR>/../Source/quazip-${QUAZIP_VERSION} - DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>/.. ${CMAKE_COMMAND} -E tar xzf ${CMAKE_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz + DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>/.. ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_BINARY_DIR}/quazip-${QUAZIP_VERSION}.tar.gz PATCH_COMMAND patch -p0 -i ${CMAKE_SOURCE_DIR}/quazip.patch CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ) -include_directories("${CMAKE_BINARY_DIR}/External/Install/QuaZIP/include/quazip") +include_directories("${CMAKE_CURRENT_BINARY_DIR}/External/Install/QuaZIP/include/quazip") if(UNIX) -set(QUAZIP_LIBRARIES -L"${CMAKE_BINARY_DIR}/External/Install/QuaZIP/lib" quazip z) +set(QUAZIP_LIBRARIES -L"${CMAKE_CURRENT_BINARY_DIR}/External/Install/QuaZIP/lib" quazip z) else() -set(QUAZIP_LIBRARIES -L"${CMAKE_BINARY_DIR}/External/Install/QuaZIP/lib" quazip) +set(QUAZIP_LIBRARIES -L"${CMAKE_CURRENT_BINARY_DIR}/External/Install/QuaZIP/lib" quazip) endif() add_subdirectory(depends/hoedown) # markdown parser |