2010-05-23 07:30:36 +00:00
|
|
|
# CDVDlinuz Plugin
|
|
|
|
|
|
|
|
# plugin name
|
2010-07-25 13:54:26 +00:00
|
|
|
set(Output CDVDlinuz)
|
2010-05-23 07:30:36 +00:00
|
|
|
|
2010-06-03 15:12:29 +00:00
|
|
|
set(CommonFlags
|
|
|
|
-Wall
|
|
|
|
-fPIC
|
|
|
|
-D_LARGEFILE64_SOURCE
|
|
|
|
)
|
|
|
|
|
|
|
|
set(OptimizationFlags
|
|
|
|
-O2
|
|
|
|
-DNDEBUG
|
|
|
|
-fomit-frame-pointer
|
|
|
|
)
|
|
|
|
|
2010-05-23 07:30:36 +00:00
|
|
|
# Debug - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
# add defines
|
2010-06-03 15:12:29 +00:00
|
|
|
add_definitions(${CommonFlags} -g)
|
2010-05-23 07:30:36 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
|
|
|
|
# Devel - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
# add defines
|
2010-06-03 15:12:29 +00:00
|
|
|
add_definitions(${CommonFlags} ${OptimizationFlags})
|
2010-05-23 07:30:36 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
|
|
|
|
# Release - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
# add defines
|
2010-06-03 15:12:29 +00:00
|
|
|
add_definitions(${CommonFlags} ${OptimizationFlags})
|
2010-05-23 07:30:36 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
|
|
|
|
# CDVDlinuz sources
|
|
|
|
set(CDVDlinuzSources
|
|
|
|
buffer.c
|
|
|
|
convert.c
|
|
|
|
ini.c
|
|
|
|
version.c)
|
|
|
|
|
|
|
|
# CDVDlinuz headers
|
|
|
|
set(CDVDlinuzHeaders
|
|
|
|
buffer.h
|
|
|
|
convert.h
|
|
|
|
ini.h
|
|
|
|
PS2Edefs.h
|
|
|
|
PS2Etypes.h
|
|
|
|
# ERROR It takes /usr/include/alsa/version.h
|
|
|
|
# Either fix include dir. Or rename the file. Or mv stuff into in another include file.
|
|
|
|
version.h
|
|
|
|
)
|
|
|
|
|
|
|
|
# CDVDlinuz Linux sources
|
|
|
|
set(CDVDlinuzLinuxSources
|
|
|
|
Linux/aboutbox.c
|
|
|
|
Linux/actualfile.c
|
|
|
|
Linux/CD.c
|
|
|
|
Linux/CDVDlinuz.c
|
|
|
|
Linux/conf.c
|
|
|
|
Linux/device.c
|
|
|
|
Linux/DVD.c
|
|
|
|
Linux/interface.c
|
|
|
|
Linux/logfile.c
|
|
|
|
Linux/mainbox.c)
|
|
|
|
|
|
|
|
# CDVDlinuz Linux headers
|
|
|
|
set(CDVDlinuzLinuxHeaders
|
|
|
|
Linux/aboutbox.h
|
|
|
|
Linux/actualfile.h
|
|
|
|
Linux/CD.h
|
|
|
|
Linux/CDVDlinuz.h
|
|
|
|
Linux/conf.h
|
|
|
|
Linux/device.h
|
|
|
|
Linux/DVD.h
|
|
|
|
Linux/logfile.h
|
|
|
|
Linux/mainbox.h)
|
|
|
|
|
|
|
|
# add additional include directories
|
|
|
|
include_directories(.
|
|
|
|
Linux)
|
|
|
|
|
|
|
|
# add library
|
2010-07-25 13:54:26 +00:00
|
|
|
add_library(${Output} SHARED
|
2010-05-23 07:30:36 +00:00
|
|
|
${CDVDlinuzSources}
|
|
|
|
${CDVDlinuzHeaders}
|
|
|
|
${CDVDlinuzLinuxSources}
|
|
|
|
${CDVDlinuzLinuxHeaders})
|
|
|
|
|
|
|
|
# set output directory
|
2010-07-25 13:54:26 +00:00
|
|
|
set_target_properties(${Output} PROPERTIES
|
2010-05-23 07:30:36 +00:00
|
|
|
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
|
2010-07-25 14:20:03 +00:00
|
|
|
|
|
|
|
# User flags options
|
|
|
|
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
|
|
|
|
target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
|
|
|
|
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
|