need a fix for ubuntu

This commit is contained in:
张壹 2022-03-06 18:55:14 +08:00
parent 1b315dbdbd
commit b3b5fc7f23

View File

@ -72,15 +72,21 @@ endif()
# #
aux_source_directory(tool SHOWME_SRC) aux_source_directory(tool SHOWME_SRC)
# X11 if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
include_directories(/opt/X11/include) #
# else()
add_executable(showme_triangle ${SHOWME_SRC}) # X11
# include_directories(/opt/X11/include)
find_library(X_LIBRARY X11 /opt/X11/lib) #
target_link_libraries(showme_triangle PUBLIC ${X_LIBRARY}) find_library(X_LIBRARY X11 /opt/X11/lib)
#
install(TARGETS showme_triangle RUNTIME DESTINATION sbin) #
add_executable(showme_triangle ${SHOWME_SRC})
target_link_libraries(showme_triangle PUBLIC ${X_LIBRARY})
#
install(TARGETS showme_triangle RUNTIME DESTINATION sbin)
endif()
# #
# #