Skip to content

Commit 580d483

Browse files
Merge pull request #70 from ksergey/fix-build-as-external
fixed build in case of submodule
2 parents f4d37b4 + 0ce7540 commit 580d483

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if(POLICY CMP0054)
1919
cmake_policy(SET CMP0054 OLD)
2020
endif()
2121

22-
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
22+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
2323

2424
set(MFAST_MAJOR_VERSION 1)
2525
set(MFAST_MINOR_VERSION 3)

src/mfast/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
1010
set(mfast_SRCS ${sources} ${instruction_sources} ${headers} ${instruction_headers})
1111

1212
add_library(mfast_static STATIC ${mfast_SRCS})
13+
target_include_directories(mfast_static PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>)
1314

1415
if (UNIX)
1516
set_target_properties(mfast_static PROPERTIES OUTPUT_NAME mfast)

0 commit comments

Comments
 (0)