Commit 66d3b203 authored by deuce's avatar deuce
Browse files

Fix up building as separate target

parent e1bd295d
......@@ -49,15 +49,16 @@ if(NEED_BITMAP)
endif()
add_library(ciolib SHARED ${SOURCE})
if(NOT ${PARENT_DIRECTORY})
find_package(XPDev REQUIRED)
include(${XPDev_CONFIG})
endif()
add_dependencies(ciolib XPDev)
target_include_directories(ciolib PRIVATE "${XPDev_DIR}/../../../include/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 INTERFACE CIOLIB_IMPORTS)
......
......@@ -18,12 +18,11 @@ endif()
add_executable(sexpots ${SOURCE})
if(NOT ${PARENT_DIRECTORY})
find_package(XPDev REQUIRED)
include(${XPDev_CONFIG})
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(../xpdev xpdev)
ENDIF()
add_dependencies(sexpots xpdev)
target_include_directories(sexpots PRIVATE "${XPDev_DIR}/../../../include/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)
......
......@@ -40,28 +40,26 @@ add_executable(syncdraw ${SOURCE})
add_executable(fontutil ${FU_SOURCE})
add_executable(buildfont ${BF_SOURCE})
if(NOT ${PARENT_DIRECTORY})
find_package(XPDev REQUIRED)
include(${XPDev_CONFIG})
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(../xpdev xpdev)
ENDIF()
add_dependencies(syncdraw xpdev)
add_dependencies(fontutil xpdev)
add_dependencies(buildfont xpdev)
include_directories("${XPDev_DIR}/../../../include/xpdev")
include_directories(../xpdev)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<TARGET_PROPERTY:xpdev,INTERFACE_COMPILE_DEFINITIONS>)
include_directories($<TARGET_PROPERTY:xpdev,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(syncdraw xpdev)
target_link_libraries(fontutil xpdev)
target_link_libraries(buildfont xpdev)
if(NOT ${PARENT_DIRECTORY})
find_package(CIOLib REQUIRED)
include(${CIOLib_CONFIG})
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(../conio conio)
ENDIF()
add_dependencies(syncdraw ciolib)
add_dependencies(fontutil ciolib)
add_dependencies(syncdraw ciolib)
include_directories(syncdraw PRIVATE "${CIOLib_DIR}/../../../include")
include_directories(../conio)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<TARGET_PROPERTY:ciolib,INTERFACE_COMPILE_DEFINITIONS>)
include_directories($<TARGET_PROPERTY:ciolib,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(syncdraw ciolib)
......
......@@ -52,40 +52,37 @@ endif()
add_executable(syncterm ${SOURCE})
if(NOT ${PARENT_DIRECTORY})
find_package(XPDev REQUIRED)
include(${XPDev_CONFIG})
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(../xpdev xpdev)
ENDIF()
add_dependencies(syncterm xpdev)
target_include_directories(syncterm PRIVATE "${XPDev_DIR}/../../../include/xpdev")
target_include_directories(syncterm PRIVATE ../xpdev)
target_compile_definitions(syncterm PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(syncterm PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(syncterm xpdev)
if(NOT ${PARENT_DIRECTORY})
find_package(CIOLib REQUIRED)
include(${CIOLib_CONFIG})
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(../conio ciolib)
ENDIF()
add_dependencies(syncterm ciolib)
target_include_directories(syncterm PRIVATE "${CIOLib_DIR}/../../../include")
target_include_directories(syncterm PRIVATE ../conio)
target_compile_definitions(syncterm PRIVATE $<TARGET_PROPERTY:ciolib,INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(syncterm PRIVATE $<TARGET_PROPERTY:ciolib,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(syncterm ciolib)
if(NOT ${PARENT_DIRECTORY})
find_package(UIFC REQUIRED)
include(${UIFC_CONFIG})
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(../uifc uifc)
ENDIF()
add_dependencies(syncterm uifc)
target_include_directories(syncterm PRIVATE "${UIFC_DIR}/../../../include")
target_include_directories(syncterm PRIVATE ../uifc)
target_compile_definitions(syncterm PRIVATE $<TARGET_PROPERTY:uifc,INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(syncterm PRIVATE $<TARGET_PROPERTY:uifc,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(syncterm uifc)
target_include_directories(syncterm PRIVATE ../uifc)
target_include_directories(syncterm PRIVATE ../sbbs3)
target_include_directories(syncterm PRIVATE ../comio)
target_include_directories(syncterm PRIVATE ../smblib)
if(NOT HAS_CRYPTLIB_H)
target_compile_definitions(syncterm PRIVATE WITHOUT_CRYPTLIB)
else()
......
......@@ -11,25 +11,24 @@ set(SOURCE
add_library(uifc SHARED ${SOURCE})
if(NOT ${PARENT_DIRECTORY})
find_package(XPDev REQUIRED)
include(${XPDev_CONFIG})
endif()
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(../xpdev xpdev)
ENDIF()
add_dependencies(uifc xpdev)
target_include_directories(uifc PRIVATE "${XPDev_DIR}/../../../include/xpdev")
target_include_directories(uifc PRIVATE ../xpdev)
target_compile_definitions(uifc PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(uifc PRIVATE $<TARGET_PROPERTY:xpdev,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(uifc xpdev)
if(NOT ${PARENT_DIRECTORY})
find_package(CIOLib REQUIRED)
include(${CIOLib_CONFIG})
endif()
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
add_subdirectory(../conio ciolib)
ENDIF()
add_dependencies(uifc ciolib)
target_include_directories(uifc PRIVATE "${CIOLib_DIR}/../../../include")
target_include_directories(uifc PRIVATE ../conio)
target_compile_definitions(uifc PRIVATE $<TARGET_PROPERTY:ciolib,INTERFACE_COMPILE_DEFINITIONS>)
target_include_directories(uifc PRIVATE $<TARGET_PROPERTY:ciolib,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(uifc ciolib)
target_compile_definitions(ciolib PRIVATE UIFC_EXPORTS)
target_compile_definitions(ciolib INTERFACE UIFC_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