mirror of
https://github.com/DirectFB/directfb.git
synced 2025-10-14 02:48:16 +08:00
cmake: add macro DEFINE_DIRECTFB_EXECUTABLE for simple tools, examples and tests
This commit is contained in:
@@ -25,6 +25,13 @@ function(INSTALL_DIRECTFB_LIB target)
|
||||
endif(LINUX)
|
||||
endfunction(INSTALL_DIRECTFB_LIB)
|
||||
|
||||
macro (DEFINE_DIRECTFB_EXECUTABLE source libs)
|
||||
get_filename_component (NAME_WE ${source} NAME_WE)
|
||||
add_executable (${NAME_WE} ${source})
|
||||
target_link_libraries (${NAME_WE} ${libs})
|
||||
install (TARGETS ${NAME_WE} DESTINATION bin)
|
||||
endmacro()
|
||||
|
||||
macro (DEFINE_DIRECTFB_MODULE target installname sources libs destination)
|
||||
add_library (${target} MODULE ${sources})
|
||||
target_link_libraries (${target} ${libs})
|
||||
@@ -32,7 +39,6 @@ macro (DEFINE_DIRECTFB_MODULE target installname sources libs destination)
|
||||
install (TARGETS ${target} LIBRARY DESTINATION ${destination})
|
||||
endmacro()
|
||||
|
||||
|
||||
macro (DEFINE_DISPATCHER_MODULE interface)
|
||||
string (TOLOWER ${interface} INTERFACE_LOWERCASE)
|
||||
add_library (${INTERFACE_LOWERCASE}_dispatcher MODULE ${INTERFACE_LOWERCASE}_dispatcher.c)
|
||||
|
@@ -1,48 +1,16 @@
|
||||
add_definitions (-DBINDIR="${CMAKE_INSTALL_PREFIX}/bin")
|
||||
|
||||
add_executable (dfbdump dfbdump.c)
|
||||
target_link_libraries (dfbdump directfb)
|
||||
|
||||
add_executable (dfbfx dfbfx.c)
|
||||
target_link_libraries (dfbfx direct)
|
||||
|
||||
add_executable (dfbg dfbg.c)
|
||||
target_link_libraries (dfbg directfb)
|
||||
|
||||
add_executable (dfbinfo dfbinfo.c)
|
||||
target_link_libraries (dfbinfo directfb)
|
||||
|
||||
add_executable (dfbinspector dfbinspector.c)
|
||||
target_link_libraries (dfbinspector directfb)
|
||||
|
||||
add_executable (dfblayer dfblayer.c)
|
||||
target_link_libraries (dfblayer directfb)
|
||||
|
||||
add_executable (dfbmaster dfbmaster.c)
|
||||
target_link_libraries (dfbmaster directfb)
|
||||
|
||||
add_executable (dfbscreen dfbscreen.c)
|
||||
target_link_libraries (dfbscreen directfb)
|
||||
|
||||
add_executable (dfbpenmount dfbpenmount.c)
|
||||
target_link_libraries (dfbpenmount directfb)
|
||||
|
||||
install (TARGETS
|
||||
dfbdump
|
||||
dfbfx
|
||||
dfbg
|
||||
dfbinfo
|
||||
dfbinspector
|
||||
dfblayer
|
||||
dfbmaster
|
||||
dfbscreen
|
||||
dfbpenmount
|
||||
|
||||
DESTINATION bin
|
||||
)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (dfbfx.c direct)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (dfbg.c directfb)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (dfbinfo.c directfb)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (dfbinspector.c directfb)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (dfblayer.c directfb)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (dfbmaster.c directfb)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (dfbscreen.c directfb)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (dfbpenmount.c directfb)
|
||||
|
||||
if (LINUX)
|
||||
add_executable (fusion_bench fusion_bench.c)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (fusion_bench.c directfb)
|
||||
target_link_libraries (fusion_bench directfb)
|
||||
|
||||
add_executable (raw15toraw24 raw15toraw24.c)
|
||||
@@ -60,86 +28,39 @@ if (LINUX)
|
||||
endif()
|
||||
|
||||
if (ENABLE_VOODOO)
|
||||
add_executable (dfbproxy dfbproxy.c)
|
||||
target_link_libraries (dfbproxy directfb)
|
||||
|
||||
add_executable (voodooplay voodooplay.c)
|
||||
target_link_libraries (voodooplay directfb)
|
||||
|
||||
add_executable (voodooplay_client voodooplay_client.c)
|
||||
target_link_libraries (voodooplay_client directfb)
|
||||
|
||||
add_executable (voodooplay_server voodooplay_server.c)
|
||||
target_link_libraries (voodooplay_server directfb)
|
||||
|
||||
install (TARGETS
|
||||
dfbproxy
|
||||
voodooplay
|
||||
voodooplay_client
|
||||
voodooplay_server
|
||||
|
||||
DESTINATION bin
|
||||
)
|
||||
DEFINE_DIRECTFB_EXECUTABLE( dfbproxy.c directfb)
|
||||
DEFINE_DIRECTFB_EXECUTABLE( voodooplay.c directfb)
|
||||
DEFINE_DIRECTFB_EXECUTABLE( voodooplay_client.c directfb)
|
||||
DEFINE_DIRECTFB_EXECUTABLE( voodooplay_server.c directfb)
|
||||
endif()
|
||||
|
||||
if (ENABLE_SAWMAN)
|
||||
include_directories ("${PROJECT_BINARY_DIR}/lib/sawman")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/lib/sawman")
|
||||
|
||||
add_executable (swmdump swmdump.c)
|
||||
target_link_libraries (swmdump sawman)
|
||||
|
||||
install (TARGETS swmdump DESTINATION bin)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (swmdump.c sawman)
|
||||
endif()
|
||||
|
||||
if (ENABLE_FUSIONDALE)
|
||||
include_directories ("${PROJECT_BINARY_DIR}/lib/fusiondale")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/lib/fusiondale")
|
||||
|
||||
add_executable (fddump fddump.c)
|
||||
target_link_libraries (fddump fusiondale)
|
||||
|
||||
add_executable (fdmaster fdmaster.c)
|
||||
target_link_libraries (fdmaster fusiondale)
|
||||
|
||||
install (TARGETS
|
||||
fddump
|
||||
fdmaster
|
||||
|
||||
DESTINATION bin
|
||||
)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (fddump.c fusiondale)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (fdmaster.c fusiondale)
|
||||
endif()
|
||||
|
||||
if (ENABLE_FUSIONSOUND)
|
||||
include_directories ("${PROJECT_BINARY_DIR}/lib/fusionsound")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/lib/fusionsound")
|
||||
|
||||
add_executable (fsdump fsdump.c)
|
||||
target_link_libraries (fsdump fusionsound)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (fsdump.c fusionsound)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (fsmaster.c fusionsound)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (fsplay.c fusionsound)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (fsvolume.c fusionsound)
|
||||
|
||||
add_executable (fsmaster fsmaster.c)
|
||||
target_link_libraries (fsmaster fusionsound)
|
||||
|
||||
add_executable (fsplay fsplay.c)
|
||||
target_link_libraries (fsplay fusionsound)
|
||||
|
||||
add_executable (fsvolume fsvolume.c)
|
||||
target_link_libraries (fsvolume fusionsound)
|
||||
|
||||
install (TARGETS
|
||||
fsdump
|
||||
fsmaster
|
||||
fsplay
|
||||
fsvolume
|
||||
|
||||
DESTINATION bin
|
||||
)
|
||||
|
||||
if (ENABLE_VOODO)
|
||||
add_executable (fsproxy fsproxy.c)
|
||||
target_link_libraries (fsproxy fusionsound)
|
||||
|
||||
install (TARGETS fsproxy DESTINATION bin)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (fsproxy.c fusionsound)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -147,40 +68,27 @@ if (ENABLE_DIVINE)
|
||||
include_directories ("${PROJECT_BINARY_DIR}/lib/divine")
|
||||
include_directories ("${PROJECT_SOURCE_DIR}/lib/divine")
|
||||
|
||||
add_executable (spooky spooky.c)
|
||||
target_link_libraries (spooky divine m)
|
||||
|
||||
install (TARGETS spooky DESTINATION bin)
|
||||
set (SPOOKY_LIBS divine m)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (spooky.c "${SPOOKY_LIBS}")
|
||||
endif()
|
||||
|
||||
if (PNG_FOUND)
|
||||
include_directories ("${PNG_INCLUDE_DIRS}")
|
||||
|
||||
add_executable (directfb-csource directfb-csource.c)
|
||||
target_link_libraries (directfb-csource ${PNG_LIBRARIES})
|
||||
DEFINE_DIRECTFB_EXECUTABLE (directfb-csource.c "${PNG_LIBRARIES}")
|
||||
|
||||
add_executable (mkdfiff mkdfiff.c)
|
||||
target_link_libraries (mkdfiff ${PNG_LIBRARIES} direct)
|
||||
set (MKDFIFF_LIBS ${PNG_LIBRARIES} direct)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (mkdfiff.c "${MKDFIFF_LIBS}")
|
||||
|
||||
add_executable (mkdgifft mkdgifft.cpp)
|
||||
target_link_libraries (mkdgifft ${PNG_LIBRARIES} directfb)
|
||||
|
||||
install (TARGETS
|
||||
directfb-csource
|
||||
mkdfiff
|
||||
mkdgifft
|
||||
|
||||
DESTINATION bin
|
||||
)
|
||||
set (MKDGIFFT_LIBS ${PNG_LIBRARIES} directfb)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (mkdgifft.cpp "${MKDGIFFT_LIBS}")
|
||||
endif()
|
||||
|
||||
if (FREETYPE_FOUND)
|
||||
include_directories ("${FREETYPE_INCLUDE_DIRS}")
|
||||
|
||||
add_executable (mkdgiff mkdgiff.c)
|
||||
target_link_libraries (mkdgiff ${FREETYPE_LIBRARIES} direct)
|
||||
|
||||
install (TARGETS mkdgiff DESTINATION bin )
|
||||
set (MKDGIFF_LIBS ${FREETYPE_LIBRARIES} direct)
|
||||
DEFINE_DIRECTFB_EXECUTABLE (mkdgiff.c "${MKDGIFF_LIBS}")
|
||||
endif()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user