forked from RepoMirrors/bemenu
31 lines
805 B
CMake
31 lines
805 B
CMake
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
|
|
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY lib)
|
|
|
|
# Sources
|
|
SET(BEMENU_SOURCE
|
|
bemenu.c
|
|
draw/curses.c
|
|
)
|
|
SET(BEMENU_INCLUDE)
|
|
SET(BEMENU_LIBRARIES)
|
|
|
|
# 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
|
|
INCLUDE_DIRECTORIES(${BEMENU_INCLUDE})
|
|
ADD_LIBRARY(bemenu ${BEMENU_SOURCE})
|
|
TARGET_LINK_LIBRARIES(bemenu ${BEMENU_LIBRARIES})
|
|
|
|
# vim: set ts=8 sw=4 tw=0 :
|