diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-09-28 20:53:46 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-09-28 20:53:46 +0200 |
commit | 143e24fa04f0126d91b65b4035dd6ec556c79b00 (patch) | |
tree | ee0e78b50e9c433bb43149f503694843b9f2eae2 /logic | |
parent | 33c3850b40aba095b056738448c235190aeb1aab (diff) | |
download | MultiMC-143e24fa04f0126d91b65b4035dd6ec556c79b00.tar MultiMC-143e24fa04f0126d91b65b4035dd6ec556c79b00.tar.gz MultiMC-143e24fa04f0126d91b65b4035dd6ec556c79b00.tar.lz MultiMC-143e24fa04f0126d91b65b4035dd6ec556c79b00.tar.xz MultiMC-143e24fa04f0126d91b65b4035dd6ec556c79b00.zip |
NOISSUE clean up some old cmake messes
Diffstat (limited to 'logic')
-rw-r--r-- | logic/CMakeLists.txt | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/logic/CMakeLists.txt b/logic/CMakeLists.txt index 457e97f3..7e9ee1d1 100644 --- a/logic/CMakeLists.txt +++ b/logic/CMakeLists.txt @@ -1,4 +1,4 @@ -project(MultiMC-Logic) +project(MultiMC_logic) set(LOGIC_SOURCES # LOGIC - Base classes and infrastructure @@ -303,36 +303,18 @@ set(LOGIC_SOURCES ) ################################ COMPILE ################################ -if(WIN32) - add_definitions(-DZ_PREFIX) -endif() +# we need zlib +find_package(ZLIB REQUIRED) -# Add common library add_library(MultiMC_logic SHARED ${LOGIC_SOURCES}) - -set_target_properties(MultiMC_logic PROPERTIES - CXX_VISIBILITY_PRESET hidden - VISIBILITY_INLINES_HIDDEN 1) +set_target_properties(MultiMC_logic PROPERTIES CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN 1) generate_export_header(MultiMC_logic) -# Use system zlib on unix and Qt ZLIB on Windows -if(UNIX) - find_package(ZLIB REQUIRED) -else(UNIX) - get_filename_component(ZLIB_FOUND_DIR "${Qt5Core_DIR}/../../../include/QtZlib" ABSOLUTE) - set(ZLIB_INCLUDE_DIRS ${ZLIB_FOUND_DIR} CACHE PATH "Path to ZLIB headers of Qt") - set(ZLIB_LIBRARIES "") - if(NOT EXISTS "${ZLIB_INCLUDE_DIRS}/zlib.h") - message("Please specify a valid zlib include dir") - endif(NOT EXISTS "${ZLIB_INCLUDE_DIRS}/zlib.h") -endif(UNIX) - # Link -target_link_libraries(MultiMC_logic xz-embedded unpack200 iconfix libUtil LogicalGui ${QUAZIP_LIBRARIES} nbt++ - Qt5::Core Qt5::Xml Qt5::Widgets Qt5::Network Qt5::Concurrent - ${ZLIB_LIBRARIES} ${MultiMC_LINK_ADDITIONAL_LIBS}) - +target_link_libraries(MultiMC_logic xz-embedded unpack200 iconfix MultiMC_util LogicalGui ${QUAZIP_LIBRARIES} nbt++ ${ZLIB_LIBRARIES}) +qt5_use_modules(MultiMC_logic Core Xml Widgets Network Concurrent) add_dependencies(MultiMC_logic QuaZIP) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +# Mark and export headers +target_include_directories(MultiMC_logic PUBLIC "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" PRIVATE "${ZLIB_INCLUDE_DIRS}") |