Commit 471e7b13 authored by deuce's avatar deuce
Browse files

Use macros.

parent 055cc872
......@@ -2,6 +2,7 @@ project (ConIOLib C)
cmake_minimum_required(VERSION 2.8.11)
INCLUDE(../build/SynchronetMacros.cmake)
INCLUDE (CheckFunctionExists)
INCLUDE (FindSDL)
INCLUDE (FindX11)
......@@ -49,16 +50,7 @@ if(NEED_BITMAP)
endif()
add_library(ciolib SHARED ${SOURCE})
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(../xpdev xpdev)
ENDIF()
add_dependencies(ciolib xpdev)
target_include_directories(ciolib PRIVATE ../xpdev)
target_compile_definitions(ciolib PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(ciolib PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(ciolib xpdev)
require_lib(ciolib xpdev)
target_compile_definitions(ciolib PRIVATE CIOLIB_EXPORTS)
target_compile_definitions(ciolib INTERFACE CIOLIB_IMPORTS)
......
......@@ -2,6 +2,7 @@ project (SExPOTS C)
cmake_minimum_required(VERSION 2.8.11)
INCLUDE(../build/SynchronetMacros.cmake)
INCLUDE (CheckIncludeFiles)
set(SOURCE
......@@ -17,15 +18,7 @@ else()
endif()
add_executable(sexpots ${SOURCE})
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(../xpdev xpdev)
ENDIF()
add_dependencies(sexpots xpdev)
target_include_directories(sexpots PRIVATE ../xpdev)
target_compile_definitions(sexpots PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(sexpots PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(sexpots xpdev)
require_lib(sexports xpdev)
target_include_directories(sexpots PRIVATE ../sbbs3)
target_include_directories(sexpots PRIVATE ../comio)
......
......@@ -2,6 +2,8 @@ project (SMBLib C)
cmake_minimum_required(VERSION 2.8.11)
INCLUDE(../build/SynchronetMacros.cmake)
set(SOURCE
smbadd.c
smballoc.c
......@@ -18,15 +20,7 @@ set(SOURCE
)
add_library(smblib SHARED ${SOURCE})
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(../xpdev xpdev)
ENDIF()
add_dependencies(smblib xpdev)
target_include_directories(smblib PRIVATE ../xpdev)
target_compile_definitions(smblib PUBLIC $<TARGET_PROPERTY:xpdev,INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(smblib PUBLIC $<TARGET_PROPERTY:xpdev,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(smblib xpdev)
require_lib(smblib xpdev)
target_compile_definitions(smblib PRIVATE SMB_EXPORTS)
target_compile_definitions(smblib INTERFACE SMB_IMPORTS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment