[CMake] install TARGETS given unknown argument "EXPORT". with cmake 2.8.9
david.hagood at gmail.com
david.hagood at gmail.com
Thu Feb 20 15:36:46 EST 2014
> Hi David,
>
> What does your install(...) line look like so we can try to help you debug
> the issue?
>
OK, this is about as simple as it gets:
---------------------------
file foo.c:
extern int foo(void)
{
return 0;
}
-------------------
file CMakeLists.txt
cmake_minimum_required( VERSION 2.8.3 )
project(foo CXX)
set( MAJOR_VERSION "0")
set( MINOR_VERSION "1")
add_library(foo SHARED foo.cpp)
install(TARGETS foo
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
EXPORT foo-targets
)
install(EXPORT foo-targets DESTINATION lib/foo)
-------------------------
Which is straight out of
http://www.cmake.org/Wiki/CMake/Tutorials/Exporting_and_Importing_Targets
--------------------
cmake --version
cmake version 2.8.9
cat /etc/SuSE-release
SUSE Linux Enterprise Desktop 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3
uname -a
Linux hostname 3.0.101-0.8-default #1 SMP Fri Nov 1 12:51:09 UTC 2013
(2417eb9) x86_64 x86_64 x86_64 GNU/Linux
More information about the CMake
mailing list