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)
|
||||
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(audio)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
include(MDEBase)
|
||||
include(MDEPkgConfig)
|
||||
|
||||
setup_lib(audio Audio)
|
||||
target_link_libraries(
|
||||
MDEAudio
|
||||
PRIVATE
|
||||
MDECore
|
||||
)
|
||||
setup_library(MDEAudio)
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
setup_lib(core Core)
|
||||
target_link_libraries(
|
||||
MDECore
|
||||
PRIVATE
|
||||
Mw
|
||||
)
|
||||
include(MDEBase)
|
||||
|
||||
setup_library(MDECore ${CMAKE_INSTALL_LIBDIR})
|
||||
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
target_link_libraries(
|
||||
MDECore
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
include(MDEBase)
|
||||
include(MDEPkgConfig)
|
||||
|
||||
setup_lib(sound Sound)
|
||||
target_link_libraries(
|
||||
MDESound
|
||||
PRIVATE
|
||||
MDECore Mw
|
||||
)
|
||||
setup_library(MDESound ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
pkg_config_add(MDESound vorbisfile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue