Generate D interface file before other targets

This commit is contained in:
Ernesto Castellotti 2019-08-28 16:50:45 +02:00
parent 89d98a759a
commit a58b6e9dba
1 changed files with 3 additions and 1 deletions

View File

@ -15,7 +15,9 @@ file(GLOB EXAMPLE_SOURCES "examples/*.d")
include_directories(include)
set(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -betterC -O -release -L-rpath=.")
set_property(SOURCE ${PUB_SOURCES} PROPERTY COMPILE_FLAGS "-Hd=${CMAKE_SOURCE_DIR}/include")
add_library(generate_header SHARED ${PUB_SOURCES})
target_compile_options (generate_header PRIVATE "-Hd=${CMAKE_SOURCE_DIR}/include")
add_library(${PROJECT_NAME} SHARED ${SOURCES})
add_executable(open-usbextreme-example ${EXAMPLE_SOURCES})