CMake: use wx prefix in library names
Rename all library targets to start with wx. This way it does not use generic names like base or core that could interfere with other libraries that add include the wxWidgets project.
This commit is contained in:
@@ -54,44 +54,44 @@ elseif(WXQT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
wx_add_library(core ${CORE_SRC})
|
||||
wx_add_library(wxcore ${CORE_SRC})
|
||||
foreach(lib JPEG PNG TIFF)
|
||||
if(${lib}_LIBRARIES)
|
||||
if(lib STREQUAL JPEG)
|
||||
wx_lib_include_directories(core PRIVATE ${${lib}_INCLUDE_DIR})
|
||||
wx_lib_include_directories(wxcore PRIVATE ${${lib}_INCLUDE_DIR})
|
||||
else()
|
||||
wx_lib_include_directories(core PRIVATE ${${lib}_INCLUDE_DIRS})
|
||||
wx_lib_include_directories(wxcore PRIVATE ${${lib}_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
wx_lib_link_libraries(core PRIVATE ${${lib}_LIBRARIES})
|
||||
wx_lib_link_libraries(wxcore PRIVATE ${${lib}_LIBRARIES})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(WIN32)
|
||||
wx_lib_link_libraries(core PRIVATE winmm)
|
||||
wx_lib_link_libraries(wxcore PRIVATE winmm)
|
||||
endif()
|
||||
if(WXOSX_COCOA)
|
||||
wx_lib_link_libraries(core PUBLIC "-framework AudioToolbox")
|
||||
wx_lib_link_libraries(wxcore PUBLIC "-framework AudioToolbox")
|
||||
if(wxUSE_WEBKIT)
|
||||
wx_lib_link_libraries(core PUBLIC "-framework WebKit")
|
||||
wx_lib_link_libraries(wxcore PUBLIC "-framework WebKit")
|
||||
endif()
|
||||
endif()
|
||||
if(WXGTK AND wxUSE_PRIVATE_FONTS)
|
||||
wx_lib_include_directories(core PUBLIC ${FONTCONFIG_INCLUDE_DIRS} ${PANGOFT2_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(core PUBLIC ${FONTCONFIG_LIBRARIES} ${PANGOFT2_LIBRARIES})
|
||||
wx_lib_include_directories(wxcore PUBLIC ${FONTCONFIG_INCLUDE_DIRS} ${PANGOFT2_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(wxcore PUBLIC ${FONTCONFIG_LIBRARIES} ${PANGOFT2_LIBRARIES})
|
||||
endif()
|
||||
if(wxUSE_LIBSDL)
|
||||
if(SDL2_FOUND)
|
||||
wx_lib_include_directories(core PUBLIC ${SDL2_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(core PUBLIC ${SDL2_LIBRARY})
|
||||
wx_lib_include_directories(wxcore PUBLIC ${SDL2_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(wxcore PUBLIC ${SDL2_LIBRARY})
|
||||
elseif(SDL_FOUND)
|
||||
wx_lib_include_directories(core PUBLIC ${SDL_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(core PUBLIC ${SDL_LIBRARY})
|
||||
wx_lib_include_directories(wxcore PUBLIC ${SDL_INCLUDE_DIR})
|
||||
wx_lib_link_libraries(wxcore PUBLIC ${SDL_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
if(wxUSE_LIBNOTIFY)
|
||||
wx_lib_include_directories(core PUBLIC ${LIBNOTIFY_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(core PUBLIC ${LIBNOTIFY_LIBRARIES})
|
||||
wx_lib_include_directories(wxcore PUBLIC ${LIBNOTIFY_INCLUDE_DIRS})
|
||||
wx_lib_link_libraries(wxcore PUBLIC ${LIBNOTIFY_LIBRARIES})
|
||||
endif()
|
||||
|
||||
wx_finalize_lib(core)
|
||||
wx_finalize_lib(wxcore)
|
||||
|
Reference in New Issue
Block a user