2014-03-18 17:35:10 +00:00
|
|
|
# Sources
|
2014-10-25 17:43:37 +00:00
|
|
|
SET(CLIENT_SOURCES
|
|
|
|
bemenu.c
|
|
|
|
bemenu-run.c
|
|
|
|
)
|
|
|
|
|
|
|
|
SET(CLIENT_INCLUDES ${BEMENU_INCLUDE_DIRS} "common")
|
2014-04-12 19:42:37 +00:00
|
|
|
SET(CLIENT_LIBRARIES ${BEMENU_LIBRARIES})
|
2014-03-18 17:35:10 +00:00
|
|
|
|
|
|
|
# Warnings
|
|
|
|
IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-variadic-macros -Wno-long-long")
|
|
|
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-variadic-macros -Wno-long-long")
|
|
|
|
ENDIF ()
|
|
|
|
|
|
|
|
IF (UNIX AND CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
IF (${CMAKE_VERSION} VERSION_LESS 2.8.9)
|
|
|
|
ADD_DEFINITIONS(-fPIC)
|
|
|
|
ENDIF ()
|
|
|
|
ENDIF ()
|
|
|
|
|
|
|
|
# Compile
|
2014-10-25 17:43:37 +00:00
|
|
|
FOREACH (SOURCE ${CLIENT_SOURCES})
|
|
|
|
INCLUDE_DIRECTORIES(${CLIENT_INCLUDES})
|
|
|
|
ADD_EXECUTABLE(${SOURCE} ${SOURCE} common/common.c)
|
|
|
|
TARGET_LINK_LIBRARIES(${SOURCE} ${CLIENT_LIBRARIES})
|
|
|
|
get_filename_component(ONAME ${SOURCE} NAME_WE)
|
|
|
|
SET_TARGET_PROPERTIES(${SOURCE} PROPERTIES OUTPUT_NAME ${ONAME})
|
|
|
|
INSTALL(TARGETS ${SOURCE} DESTINATION bin)
|
|
|
|
ENDFOREACH ()
|
2014-03-18 17:35:10 +00:00
|
|
|
|
|
|
|
# vim: set ts=8 sw=4 tw=0 :
|