cmake: fix nasm sources build when building in a separate directory
authorsezero <sezero@users.sourceforge.net>
Tue, 8 Oct 2019 11:35:24 +0000 (14:35 +0300)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Thu, 10 Oct 2019 07:32:21 +0000 (18:32 +1100)
When building in the same directory as the source, it works, but not in
a separate directory.  The trailing slash is important with nasm.  Note
that include_directories("${CMAKE_CURRENT_SOURCE_DIR}/") does not work
because cmake seems to strip the trailing slash.

Also relax the cmake version requirement from 3.12 to 3.9 as everywhere
else in the tree: it works just fine.

src/libFLAC/ia32/CMakeLists.txt

index 88dc69c..0236a39 100644 (file)
@@ -1,6 +1,7 @@
-cmake_minimum_required(VERSION 3.12)
+cmake_minimum_required(VERSION 3.9)
 
-include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
+#include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
+add_compile_options(-I${CMAKE_CURRENT_SOURCE_DIR}/)
 
 if(APPLE)
     add_compile_options(-dOBJ_FORMAT_macho)