aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-07-03 20:46:05 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-07-03 20:46:05 +0200
commitfd3c124f8738de3cbd380906b70135fad8c09d87 (patch)
treeca4baf33e7d72af074abec4f25069579b2d9061a /CMakeLists.txt
parent1a8b4591f56a2e62a601a32508f3d49ae0c7f112 (diff)
downloadnextpnr-fd3c124f8738de3cbd380906b70135fad8c09d87.tar.gz
nextpnr-fd3c124f8738de3cbd380906b70135fad8c09d87.tar.bz2
nextpnr-fd3c124f8738de3cbd380906b70135fad8c09d87.zip
Add opetion to defie ICEBOX_ROOT, fix compile on other location
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 908df411..b8629aaf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,12 +52,12 @@ execute_process(
)
if (BUILD_TESTS)
- add_subdirectory(3rdparty/googletest/googletest generated/3rdparty/googletest EXCLUDE_FROM_ALL)
+ add_subdirectory(3rdparty/googletest/googletest ${CMAKE_CURRENT_BINARY_DIR}/generated/3rdparty/googletest EXCLUDE_FROM_ALL)
enable_testing()
endif()
if (BUILD_GUI)
- add_subdirectory(3rdparty/QtPropertyBrowser generated/3rdparty/QtPropertyBrowser)
+ add_subdirectory(3rdparty/QtPropertyBrowser ${CMAKE_CURRENT_BINARY_DIR}/generated/3rdparty/QtPropertyBrowser)
endif()
add_definitions("-DGIT_COMMIT_HASH=${GIT_COMMIT_HASH}")
@@ -136,7 +136,7 @@ foreach (family ${FAMILIES})
aux_source_directory(${family}/ ${ufamily}_FILES)
if (BUILD_GUI)
- add_subdirectory(gui generated/gui/${family})
+ add_subdirectory(gui ${CMAKE_CURRENT_BINARY_DIR}/generated/gui/${family})
endif()
# Add the CLI binary target
@@ -175,7 +175,7 @@ foreach (family ${FAMILIES})
include(${family}/family.cmake)
foreach (target ${family_targets})
# Include family-specific source files to all family targets and set defines appropriately
- target_include_directories(${target} PRIVATE ${family}/ generated/)
+ target_include_directories(${target} PRIVATE ${family}/ ${CMAKE_CURRENT_BINARY_DIR}/generated/)
target_compile_definitions(${target} PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family} ARCH_${ufamily} ARCHNAME=${family})
target_link_libraries(${target} LINK_PUBLIC ${Boost_LIBRARIES})
add_sanitizers(${target})