Update library names to match cmake upstream

This commit is contained in:
Mahmood(Thunder07) 2018-01-10 21:53:04 +00:00
parent ed52b04cb9
commit 8319bcd6d9
3 changed files with 9 additions and 18 deletions

View file

@ -142,17 +142,14 @@ endif()
find_package(ZLIB)
if(NOT ZLIB_FOUND)
MESSAGE("-- Using Provided zlib source")
if(NOT TARGET zlibstatic)
if(NOT TARGET ZLIB::ZLIB)
add_subdirectory(
${CMAKE_CURRENT_SOURCE_DIR}/../../Dependencies/build_cmake/zlib-1.2.8
${CMAKE_CURRENT_BINARY_DIR}/zlib-1.2.8
)
endif()
set(ZLIB_LIBRARIES zlibstatic CACHE)
else()
include_directories(${ZLIB_INCLUDE_DIRS})
list(APPEND PROJECT_LIBS ${ZLIB_LIBRARIES})
endif()
list(APPEND PROJECT_LIBS ZLIB::ZLIB)
if(NOT (TARGET_PLATFORM_ANDROID OR TARGET_PLATFORM_IOS))
find_package(OpenGL REQUIRED)
@ -170,7 +167,7 @@ add_library(gsh_opengl STATIC
../Source/gs/GSH_OpenGL/GSH_OpenGL_Shader.cpp
../Source/gs/GSH_OpenGL/GSH_OpenGL_Texture.cpp
)
target_link_libraries(gsh_opengl Boost::boost Framework_OpenGl ${${ZLIB_LIBRARIES}})
target_link_libraries(gsh_opengl Boost::boost Framework_OpenGl ZLIB::ZLIB)
list(INSERT PROJECT_LIBS 0 gsh_opengl)
if(TARGET_PLATFORM_UNIX)
@ -482,7 +479,7 @@ if(TARGET_PLATFORM_WIN32)
../Source/ui_win32/GSH_Direct3D9_Shader.cpp
../Source/ui_win32/GSH_Direct3D9_Texture.cpp
)
target_link_libraries(gsh_d3d9 Boost::boost Framework ${ZLIB_LIBRARIES} Nuanceur)
target_link_libraries(gsh_d3d9 Boost::boost Framework ZLIB::ZLIB Nuanceur)
list(APPEND PROJECT_LIBS gsh_d3d9)
include_directories(

View file

@ -185,13 +185,13 @@ endif()
find_package(BZip2)
if(NOT BZIP2_FOUND)
MESSAGE("-- Using Provided BZip2 source")
if (NOT TARGET bz2)
if (NOT TARGET BZip2::BZip2)
add_subdirectory(
${CMAKE_CURRENT_SOURCE_DIR}/../../../Dependencies/build_cmake/bzip2-1.0.6
${CMAKE_CURRENT_BINARY_DIR}/bzip2-1.0.6
)
endif()
list(APPEND PROJECT_LIBS bz2)
list(APPEND PROJECT_LIBS BZip2::BZip2)
else()
include_directories(${BZIP2_INCLUDE_DIR})
list(APPEND PROJECT_LIBS ${BZIP2_LIBRARIES})
@ -206,11 +206,8 @@ if(NOT ZLIB_FOUND)
${CMAKE_CURRENT_BINARY_DIR}/zlib-1.2.8
)
endif()
list(APPEND PROJECT_LIBS zlibstatic)
else()
include_directories(${ZLIB_INCLUDE_DIRS})
list(APPEND PROJECT_LIBS ${ZLIB_LIBRARIES})
endif()
list(APPEND PROJECT_LIBS ZLIB::ZLIB)
set(COMMON_SRC_FILES
../../Source/AppConfig.cpp

View file

@ -82,17 +82,14 @@ list(APPEND PROJECT_LIBS PlayCore)
find_package(ZLIB)
if(NOT ZLIB_FOUND)
MESSAGE("-- Using Provided zlib source")
if(NOT TARGET zlibstatic)
if(NOT TARGET ZLIB::ZLIB)
add_subdirectory(
${CMAKE_CURRENT_SOURCE_DIR}/../../../../../Dependencies/build_cmake/zlib-1.2.8
${CMAKE_CURRENT_BINARY_DIR}/zlib-1.2.8
)
endif()
list(APPEND PROJECT_LIBS zlibstatic)
else()
include_directories(${ZLIB_INCLUDE_DIRS})
list(APPEND PROJECT_LIBS ${ZLIB_LIBRARIES})
endif()
list(APPEND PROJECT_LIBS ZLIB::ZLIB)
if(NOT TARGET Boost::boost)
add_subdirectory(