Merge branch 'master' into table

This commit is contained in:
Pietro Gagliardi 2018-05-13 00:15:37 -04:00
commit 86798f72b1
4 changed files with 9 additions and 25 deletions

View File

@ -148,34 +148,33 @@ endmacro()
add_subdirectory("common")
add_subdirectory("${_OSNAME}")
add_library(${_LIBUINAME} ${_LIBUI_SOURCES})
target_include_directories(${_LIBUINAME}
add_library(libui ${_LIBUI_SOURCES})
target_include_directories(libui
PUBLIC .
PRIVATE ${_LIBUI_INCLUEDIRS})
target_compile_definitions(${_LIBUINAME}
target_compile_definitions(libui
PRIVATE ${_LIBUI_DEFS})
# cmake produces this for us by default but only for shared libraries
target_compile_definitions(${_LIBUINAME}
target_compile_definitions(libui
PRIVATE libui_EXPORTS)
target_compile_options(${_LIBUINAME}
target_compile_options(libui
PUBLIC ${_COMMON_CFLAGS}
PRIVATE ${_LIBUI_CFLAGS})
# TODO link directories?
if(BUILD_SHARED_LIBS)
target_link_libraries(${_LIBUINAME}
target_link_libraries(libui
PRIVATE ${_LIBUI_LIBS})
endif()
# TODO INTERFACE libs don't inherit to grandhcildren?
# on Windows the linker for static libraries is different; don't give it the flags
if(BUILD_SHARED_LIBS)
_target_link_options_private(${_LIBUINAME}
_target_link_options_private(libui
_COMMON_LDFLAGS
_LIBUI_LDFLAGS)
endif()
if(NOT BUILD_SHARED_LIBS)
_handle_static()
# TODO figure out a way to tell libui that it's static
target_compile_definitions(${_LIBUINAME}
target_compile_definitions(libui
PUBLIC _UI_STATIC)
endif()
if(NOT MSVC)
@ -200,7 +199,7 @@ if(NOT MSVC)
endif()
if(BUILD_SHARED_LIBS)
if(_HASVERSION)
set_target_properties(${_LIBUINAME} PROPERTIES
set_target_properties(libui PROPERTIES
SOVERSION "${_VERSION}")
endif()
endif()

View File

@ -58,11 +58,6 @@ list(APPEND _LIBUI_INCLUDEDIRS
)
set(_LIBUI_INCLUDEDIRS _LIBUI_INCLUDEDIRS PARENT_SCOPE)
set(_LIBUINAME libui PARENT_SCOPE)
macro(_handle_static)
# do nothing
endmacro()
set(_LIBUI_LIBS
objc "-framework Foundation" "-framework AppKit"
PARENT_SCOPE)

View File

@ -55,11 +55,6 @@ list(APPEND _LIBUI_INCLUDEDIRS
)
set(_LIBUI_INCLUDEDIRS _LIBUI_INCLUDEDIRS PARENT_SCOPE)
set(_LIBUINAME libui PARENT_SCOPE)
macro(_handle_static)
# do nothing
endmacro()
# TODO the other variables don't work?
set(_LIBUI_CFLAGS
${GTK_CFLAGS}

View File

@ -74,11 +74,6 @@ list(APPEND _LIBUI_INCLUDEDIRS
)
set(_LIBUI_INCLUDEDIRS _LIBUI_INCLUDEDIRS PARENT_SCOPE)
set(_LIBUINAME libui PARENT_SCOPE)
macro(_handle_static)
# do nothing
endmacro()
# TODO prune this list
set(_LIBUI_LIBS
user32 kernel32 gdi32 comctl32 uxtheme msimg32 comdlg32 d2d1 dwrite ole32 oleaut32 oleacc uuid