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

Use macros.

parent 055cc872
...@@ -2,6 +2,7 @@ project (ConIOLib C) ...@@ -2,6 +2,7 @@ project (ConIOLib C)
cmake_minimum_required(VERSION 2.8.11) cmake_minimum_required(VERSION 2.8.11)
INCLUDE(../build/SynchronetMacros.cmake)
INCLUDE (CheckFunctionExists) INCLUDE (CheckFunctionExists)
INCLUDE (FindSDL) INCLUDE (FindSDL)
INCLUDE (FindX11) INCLUDE (FindX11)
...@@ -49,16 +50,7 @@ if(NEED_BITMAP) ...@@ -49,16 +50,7 @@ if(NEED_BITMAP)
endif() endif()
add_library(ciolib SHARED ${SOURCE}) add_library(ciolib SHARED ${SOURCE})
require_lib(ciolib xpdev)
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)
target_compile_definitions(ciolib PRIVATE CIOLIB_EXPORTS) target_compile_definitions(ciolib PRIVATE CIOLIB_EXPORTS)
target_compile_definitions(ciolib INTERFACE CIOLIB_IMPORTS) target_compile_definitions(ciolib INTERFACE CIOLIB_IMPORTS)
......
...@@ -2,6 +2,7 @@ project (SExPOTS C) ...@@ -2,6 +2,7 @@ project (SExPOTS C)
cmake_minimum_required(VERSION 2.8.11) cmake_minimum_required(VERSION 2.8.11)
INCLUDE(../build/SynchronetMacros.cmake)
INCLUDE (CheckIncludeFiles) INCLUDE (CheckIncludeFiles)
set(SOURCE set(SOURCE
...@@ -17,15 +18,7 @@ else() ...@@ -17,15 +18,7 @@ else()
endif() endif()
add_executable(sexpots ${SOURCE}) add_executable(sexpots ${SOURCE})
require_lib(sexports xpdev)
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)
target_include_directories(sexpots PRIVATE ../sbbs3) target_include_directories(sexpots PRIVATE ../sbbs3)
target_include_directories(sexpots PRIVATE ../comio) target_include_directories(sexpots PRIVATE ../comio)
......
...@@ -2,6 +2,8 @@ project (SMBLib C) ...@@ -2,6 +2,8 @@ project (SMBLib C)
cmake_minimum_required(VERSION 2.8.11) cmake_minimum_required(VERSION 2.8.11)
INCLUDE(../build/SynchronetMacros.cmake)
set(SOURCE set(SOURCE
smbadd.c smbadd.c
smballoc.c smballoc.c
...@@ -18,15 +20,7 @@ set(SOURCE ...@@ -18,15 +20,7 @@ set(SOURCE
) )
add_library(smblib SHARED ${SOURCE}) add_library(smblib SHARED ${SOURCE})
require_lib(smblib xpdev)
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)
target_compile_definitions(smblib PRIVATE SMB_EXPORTS) target_compile_definitions(smblib PRIVATE SMB_EXPORTS)
target_compile_definitions(smblib INTERFACE SMB_IMPORTS) 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