diff --git a/CMakeLists.txt b/CMakeLists.txt index 4cf74b6e..a2f5b0f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,9 +99,9 @@ set_target_properties(${PROJECT_AWE_NAME} LINK_FLAGS -export-dynamic) target_link_libraries(${PROJECT_AWE_NAME} - ${AWESOME_COMMON_REQUIRED_LIBRARIES} - ${AWESOME_REQUIRED_LIBRARIES} - ${AWESOME_OPTIONAL_LIBRARIES}) + ${AWESOME_COMMON_REQUIRED_LDFLAGS} + ${AWESOME_REQUIRED_LDFLAGS} + ${AWESOME_OPTIONAL_LDFLAGS}) # atoms file(MAKE_DIRECTORY ${BUILD_DIR}/common) diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index a90bbc61..baa68322 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -124,7 +124,7 @@ execute_process( # {{{ Required libraries # # this sets up: -# AWESOME_REQUIRED_LIBRARIES +# AWESOME_REQUIRED_LDFLAGS # AWESOME_REQUIRED_INCLUDE_DIRS # Use pkgconfig to get most of the libraries @@ -173,8 +173,8 @@ if(NOT HAS_EXECINFO) find_library(LIB_EXECINFO execinfo) if(LIB_EXECINFO) set(HAS_EXECINFO 1) - set(AWESOME_REQUIRED_LIBRARIES - ${AWESOME_REQUIRED_LIBRARIES} + set(AWESOME_REQUIRED_LDFLAGS + ${AWESOME_REQUIRED_LDFLAGS} ${LIB_EXECINFO}) endif() endif() @@ -199,9 +199,9 @@ if(NOT LUA51_FOUND AND NOT LUA50_FOUND) # This is a workaround to a cmake bug message(FATAL_ERROR "lua library not found") endif() -set(AWESOME_REQUIRED_LIBRARIES +set(AWESOME_REQUIRED_LDFLAGS ${AWESOME_COMMON_REQUIRED_LDFLAGS} - ${AWESOME_REQUIRED_LIBRARIES} + ${AWESOME_REQUIRED_LDFLAGS} ${LIB_EV} ${LUA_LIBRARIES}) @@ -214,13 +214,13 @@ set(AWESOME_REQUIRED_INCLUDE_DIRS # {{{ Optional libraries # # this sets up: -# AWESOME_OPTIONAL_LIBRARIES +# AWESOME_OPTIONAL_LDFLAGS # AWESOME_OPTIONAL_INCLUDE_DIRS if(WITH_DBUS) pkg_check_modules(DBUS dbus-1) if(DBUS_FOUND) - set(AWESOME_OPTIONAL_LIBRARIES ${AWESOME_OPTIONAL_LIBRARIES} ${DBUS_LDFLAGS}) + set(AWESOME_OPTIONAL_LDFLAGS ${AWESOME_OPTIONAL_LDFLAGS} ${DBUS_LDFLAGS}) set(AWESOME_OPTIONAL_INCLUDE_DIRS ${AWESOME_OPTIONAL_INCLUDE_DIRS} ${DBUS_INCLUDE_DIRS}) else() set(WITH_DBUS OFF)