cmake
This commit is contained in:
parent
367c769516
commit
eedeb87595
4 changed files with 7 additions and 48 deletions
|
|
@ -4,36 +4,6 @@ project(
|
||||||
)
|
)
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
macro(setup_lib dir name)
|
|
||||||
project(
|
|
||||||
mde${dir}
|
|
||||||
)
|
|
||||||
|
|
||||||
file(
|
|
||||||
GLOB
|
|
||||||
MDE${name}_SRC
|
|
||||||
*.c
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(
|
|
||||||
MDE${name}
|
|
||||||
SHARED
|
|
||||||
${MDE${name}_SRC}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(
|
|
||||||
MDE${name}
|
|
||||||
PUBLIC
|
|
||||||
../include
|
|
||||||
)
|
|
||||||
|
|
||||||
install(
|
|
||||||
TARGETS MDE${name}
|
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
)
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
add_subdirectory(core)
|
add_subdirectory(core)
|
||||||
add_subdirectory(audio)
|
add_subdirectory(audio)
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,7 @@
|
||||||
|
include(MDEBase)
|
||||||
include(MDEPkgConfig)
|
include(MDEPkgConfig)
|
||||||
|
|
||||||
setup_lib(audio Audio)
|
setup_library(MDEAudio)
|
||||||
target_link_libraries(
|
|
||||||
MDEAudio
|
|
||||||
PRIVATE
|
|
||||||
MDECore
|
|
||||||
)
|
|
||||||
|
|
||||||
find_package(PkgConfig)
|
find_package(PkgConfig)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
setup_lib(core Core)
|
include(MDEBase)
|
||||||
target_link_libraries(
|
|
||||||
MDECore
|
setup_library(MDECore ${CMAKE_INSTALL_LIBDIR})
|
||||||
PRIVATE
|
|
||||||
Mw
|
|
||||||
)
|
|
||||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
MDECore
|
MDECore
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
|
include(MDEBase)
|
||||||
include(MDEPkgConfig)
|
include(MDEPkgConfig)
|
||||||
|
|
||||||
setup_lib(sound Sound)
|
setup_library(MDESound ${CMAKE_INSTALL_LIBDIR})
|
||||||
target_link_libraries(
|
|
||||||
MDESound
|
|
||||||
PRIVATE
|
|
||||||
MDECore Mw
|
|
||||||
)
|
|
||||||
|
|
||||||
pkg_config_add(MDESound vorbisfile)
|
pkg_config_add(MDESound vorbisfile)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue